Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE EXTERNAL TABLE tab1
- (id bigint, created_at string, .. <other fields>)
- ROW FORMAT DELIMITED FIELDS TERMINATED BY '\t'
- LOCATION '/user/admin/tab1';
- sqoop job --create tab1_job -- import \
- --connect jdbc:mysql://<url>:3306/<database> \
- --table <tablename> \
- --username <username> \
- --password <password> \
- -m 1 \
- --target-dir /user/admin/tab1 \
- --fields-terminated-by '\t' \
- --append \
- --incremental lastmodified \
- --check-column created_at \
- --hive-table tab1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement