Created
November 13, 2017 03:42
-
-
Save dgadiraju/eb515a5070c8d27d3fd4cb3cb5d35ed1 to your computer and use it in GitHub Desktop.
This file contains 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 import \ | |
--connect jdbc:mysql://ms.itversity.com:3306/retail_db \ | |
--username retail_user \ | |
--password itversity \ | |
--target-dir /user/dgadiraju/sqoop_import/retail_db/orders_with_revenue \ | |
--num-mappers 2 \ | |
--query "select o.*, sum(oi.order_item_subtotal) order_revenue from orders o join order_items oi on o.order_id = oi.order_item_order_id and \$CONDITIONS group by o.order_id, o.order_date, o.order_customer_id, o.order_status" \ | |
--split-by order_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment