Skip to content

Instantly share code, notes, and snippets.

@dgadiraju
Created May 3, 2017 23:54
Show Gist options
  • Save dgadiraju/5a1827c7925889d046f18ee19dcc7d28 to your computer and use it in GitHub Desktop.
Save dgadiraju/5a1827c7925889d046f18ee19dcc7d28 to your computer and use it in GitHub Desktop.
sqoop list-databases \
--connect "jdbc:mysql://nn01.itversity.com:3306" \
--username retail_dba \
--password itversity
#Make sure there is no directory specified in target-dir
#Also make sure you replace dgadiraju with appropriate user name
#For Cloudera or Hortonworks based VM environments you can change nn01.itversity.com
#to appropriate host names or localhost
sqoop import \
--connect "jdbc:mysql://nn01.itversity.com:3306/retail_db" \
--username=retail_dba \
--password=itversity \
--table departments \
--target-dir=/user/dgadiraju/demo/departments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment