Skip to content

Instantly share code, notes, and snippets.

@gbraccialli
Last active December 22, 2015 00:53
Show Gist options
  • Save gbraccialli/ddc57fded013b5354848 to your computer and use it in GitHub Desktop.
Save gbraccialli/ddc57fded013b5354848 to your computer and use it in GitHub Desktop.
#mysql -u root
#CREATE USER 'testsqoop'@'localhost' IDENTIFIED BY 'pwd';
#CREATE USER 'testsqoop'@'%' IDENTIFIED BY 'pwd';
#GRANT ALL PRIVILEGES ON *.* TO 'testsqoop'@'localhost' WITH GRANT OPTION;
#GRANT ALL PRIVILEGES ON *.* TO 'testsqoop'@'%' WITH GRANT OPTION;
#FLUSH PRIVILEGES;
sqoop list-tables --connect jdbc:mysql://sandbox.hortonworks.com/hive --username=testsqoop --password=pwd
sqoop import --verbose --connect jdbc:mysql://sandbox.hortonworks.com/hive --username=testsqoop --password=pwd --table TBLS --hcatalog-table sqoop_test --hcatalog-storage-stanza "stored as orc" -m 1 --create-hcatalog-table
sqoop import --verbose --connect jdbc:mysql://sandbox.hortonworks.com/hive --username=testsqoop --password=pwd --table TBLS --hcatalog-table sqoop_test2 -m 1 --create-hcatalog-table
sqoop import --verbose --connect jdbc:mysql://sandbox.hortonworks.com/hive --username=testsqoop --password=pwd --table TBLS --hcatalog-table sqoop_test4 --hcatalog-storage-stanza "stored as orc" -m 10 --create-hcatalog-table
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment