How to use local password-file parameter with sqoop
Problem: sometimes we have to
read password from file for sqoop command.
Solution: Passing password parameter
file to sqoop command is not a big deal. Just follow below steps:
1. Create a password with
Echo -n “<<password>> > <<passwordfilename>>
E.g.
Echo -n “Srinivas”
> passwordfile – Here we can give file name with location
Sqoop Command:
sqoop
list-tables --connect
"jdbc:mysql://sandbox.hortonworks.com:3306/hdpcdpractise" --username
hadoop --password-file file:///usr/Srinivas/ passwordfile