Sqoop incremental load getting failed on baseline query


#1

Hi,
I’m trying to run this command but it is saying : Permission denied.
sqoop import --connect jdbc:mysql://ms.itversity.com:3306/retail_export --username retail_user --password itversity --target-dir /user/s*35/sqoop_import/retail_db/orders --num-mappers 2 --query “select * from orders where $CONDITIONS and orderDate like ‘2003-%’” --split-by orderNumber

Err:
Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=saikiranchepuri35, access=WRITE, inode="/user/s*35/sqoop_import/retail_db/orders/_temporary/1":hdfs:hdfs:drwxr-xr-x
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:319)
at org.apache.hadoop.hdfs.server.namenode.FSPermissionChecker.check(FSPermissionChecker.java:292)


#2

@saikiranchepuri35 You should use Fully Qualified username in the path.

And in the query, You have to use “\” before the $CONDITIONS

sqoop import --connect jdbc:mysql://ms.itversity.com:3306/retail_export --username retail_user --password itversity --target-dir /user/s*35/sqoop_import/retail_db/orders --num-mappers 2 --query “select * from orders where $CONDITIONS and orderDate like ‘2003-%’” --split-by orderNumber

`


#3

Ok,
Thanks for the update. Now it is working fine. :slight_smile: