Information: Use --options-file in sqoop to use mention the arguments that do not change from invocation to invocation

Hello,

Just thought to share it with you and please ignore if you have already aware.

You can create file and have the arguments that that do not change from invocation to invocation so you can use it during the sqoop invocation.

For the instance.
[email2dgk@gw01 sqoop]$ cat mysql_retail_db.opt
–connect
jdbc:mysql://nn01.itversity.com:3306/retail_db
–username
retail_dba
-P

Examples:

sqoop eval --options-file ./mysql_retail_db.opt --query ‘SELECT COUNT(*) FROM products’

sqoop list-tables --options-file ./mysql_retail_db.opt

4 Likes