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