Skip to content

Instantly share code, notes, and snippets.

@milindjagre
Last active March 18, 2017 09:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save milindjagre/02410cb2222f66e5758ceda26662fc44 to your computer and use it in GitHub Desktop.
Save milindjagre/02410cb2222f66e5758ceda26662fc44 to your computer and use it in GitHub Desktop.
This file is used for importing the custom query from RDBMS to HDFS using Apache Sqoop
sqoop import \
--connect jdbc:mysql://sandbox.hortonworks.com:3306/retail_db \
--username retail_dba \
--password hadoop \
--query 'select * from customers WHERE customer_zipcode=78521 AND $CONDITIONS' \
--split-by customer_id \
--target-dir /user/root/custom_query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment