Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 04-27-2016 07:29 AM
Please find the attached for the error screen grabscreen-shot-2016-04-27-at-082448.png
Sqoop Query :
sqoop import --driver com.mysql.jdbc.Driver --connect jdbc:mysql://sandbox.hortonworks.com/test --username root -P --m 1 --query "select empid, ename from emp WHERE '$CONDITIONS' AND eid > '200' " --target-dir /user/maria_dev
Created 04-27-2016 08:00 AM
hi, correct syntax is:
select empid, ename from emp WHERE eid > '200' and $CONDITIONS (no ' ' on $CONDITIONS)
Created 04-27-2016 08:00 AM
hi, correct syntax is:
select empid, ename from emp WHERE eid > '200' and $CONDITIONS (no ' ' on $CONDITIONS)
Created 04-27-2016 08:21 AM
@Alessio Ubaldi : Thanks the query has started but its still failing. I guess I am still missing something. screen-shot-2016-04-27-at-092033.png
Created 04-27-2016 09:10 AM
Can you attach all log?
By the way I think the problem is --target-dir:
use /user/root/test
For 2 reason:
1) Have permission to write with root user on /user/maria_dev? Default no.
2) target-dir must not exist, or job have this error: ERROR tool.ImportTool: Encountered IOException running import job: org.apache.hadoop.mapred.FileAlreadyExistsException: Output directory hdfs://sandbox.hortonworks.com:8020/user/root/test already exists
Created 04-27-2016 10:42 AM
It worked Thanks
Created 04-27-2016 10:47 AM
you are welcome