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 08-17-2017 07:10 PM
I'm able to use credential provider to encrypt password. Also be able to use it with sqoop command. But I can't work it out if I want to put connection string in option files. Anybody can give me some clue ?
Thanks
Created 08-18-2017 05:43 AM
Thank you @Sonu Sahi for the response. I checked your colleague's blog. He is using password file but not the password alias (credential provider) which is saving password in keystore instead of file.
Any way I finally figure out how to make it work. In case some one else need this in the future, I paste my solution here:
The option file:
import
-connect
"jdbc:sqlserver://host:1433;database=DB1"
Script for Sqoop job defination:
sqoop job -Dhadoop.security.credential.provider.path=jceks://hdfs/user/root/mysql.password.jceks --create sqoop_test -- options-file db.props --username sqoop_ro --password-alias sqoop_ro.passwd --target-dir /XXX --query 'select ....'
This works for me.
Thanks
Created 08-17-2017 09:24 PM
Hu @Lucy zhang
My colleague has a nice blog post showing to do this in sqoop here: http://blog.ervits.com/2015/03/running-saved-sqoop-144-jobs-with.html
Created 08-18-2017 05:43 AM
Thank you @Sonu Sahi for the response. I checked your colleague's blog. He is using password file but not the password alias (credential provider) which is saving password in keystore instead of file.
Any way I finally figure out how to make it work. In case some one else need this in the future, I paste my solution here:
The option file:
import
-connect
"jdbc:sqlserver://host:1433;database=DB1"
Script for Sqoop job defination:
sqoop job -Dhadoop.security.credential.provider.path=jceks://hdfs/user/root/mysql.password.jceks --create sqoop_test -- options-file db.props --username sqoop_ro --password-alias sqoop_ro.passwd --target-dir /XXX --query 'select ....'
This works for me.
Thanks