Created
February 15, 2017 19:59
-
-
Save nickwhite917/600313b7bd3f08aa7d0073b01c1309fd to your computer and use it in GitHub Desktop.
Sqoop from DB2 to Hive.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Example command to run: ./sqoop_warehouse_to_hive_db warehouse_table_name table_partition_column | |
| echo "Running sqoop import on table: $1 with key $2. If this is not correct, exit now with CTRL-C - Nick" | |
| sleep 5 | |
| sqoop import --connect jdbc:db2://server.host.name:port/DatabaseName --username user123 --password pass456 \ | |
| --table $1 --split-by $2 --fields-terminated-by '\t' \ | |
| --hive-overwrite --hive-import --hive-table $1 --hive-database warehouse |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment