Created
November 19, 2018 07:40
-
-
Save prasku5/ba418329820e74de8dd16b86e594b287 to your computer and use it in GitHub Desktop.
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
sqoop export --connect jdbc:mysql://localhost/retail_export --username root | |
--export-dir /user/hive/warehouse/test_hive_import.db/order_items // Source | |
--table order_items_export // Destination table. | |
--update-mode allowinsert //when the source HDFS data has any changes it will over write in destination table | |
--update-key 'order_item_id,order_id' ---> comma seperated. | |
-m 1 | |
--input-fields-terminated-by '\001' | |
--input-null-non-string "null" | |
--input-null-string "null" | |
--columns order_item_id ,order_item_order_id, order_item_product_id , order_item_quantity , order_item_subtotal ,order_item_product_price | |
// we are selecting only required columns. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment