Advertisement
Guest User

Untitled

a guest
Jun 30th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. CREATE EXTERNAL TABLE tab1
  2. (id bigint, created_at string, .. <other fields>)
  3. ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'
  4. LOCATION '/user/admin/tab1';
  5.  
  6. sqoop job --create tab1_job -- import \
  7. --connect jdbc:mysql://<url>:3306/<database> \
  8. --table <tablename> \
  9. --username <username> \
  10. --password <password> \
  11. -m 1 \
  12. --target-dir /user/admin/tab1 \
  13. --fields-terminated-by '\t' \
  14. --append \
  15. --incremental lastmodified \
  16. --check-column created_at \
  17. --hive-table tab1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement