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