Support Questions
Find answers, ask questions, and share your expertise

Sqoop execution command asking for password..How to execute the sqoop execution command without need of password??

Hi,

I have created a sqoop job using below mentioned command but when i execute the sqoop job,then it asks for password.Command works fine when I give the password.

sqoop job --create incnew -- import -connect jdbc:mysql://*********:3306/hto --username ***** --password ******* --table daily_sales --target-dir /user/q3tech/All --incremental append --check-column added_on --last-value '2018-08-15 00:00:00'

Please let me know how to execute the sqoop command i.e "sqoop job --exec incnew" without the need of password.

1 REPLY 1

Super Guru

@Gourav Gupta

Use --password-file argument and store the password file in your HDFS and give the path to the password file in your sqoop job creation.

sqoop job --create incnew -- import -connect jdbc:mysql://*********:3306/hto --username --password-file <HDFS-Path> --table daily_sales --target-dir /user/q3tech/All --incremental append --check-column added_on --last-value '2018-08-15 00:00:00'

Then while executing the sqoop job will get the password from password file.

Refer to Securely manage passwords and this and this links for more details regards to password file usage in sqoop.

-

If the Answer helped to resolve your issue, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.

; ;