Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to run Sqoop job through oozie ?


How to run Sqoop job through oozie ?

New Contributor

I have created a sqoop job abc1

sqoop job --create abc -- import --connect jdbc:mysql://192.168.XXX.XXX:3306/oozie1 --username root --password root --table user --target-dir /user/poc1 -m 1;

While running on CLI its executing.

sqoop job --exec abc;

But how to schedule it in oozie?

And how to schedule the following incremental job in OOZIE.

sqoop job -D oracle.sessionTimeZone=GMT --create oracle1 -- import --options-file /root/oracle1.txt --table DEMO_ORDERS --target-dir /user/root/orders/ --as-textfile --split-by CUSTOMER_ID --append --incremental lastmodified --check-column ORDER_TIMESTAMP --last-value '1900-01-01 00:00:00.0' --num-mappers 5 --fields-terminated-by ',';

How can i get the "LAST VALUE" from the SQOOP METASTORE or from Logs. (Sqoop job handles it automatically..but how can i get it explicitly ?)

Where it is stored ..?

Any guidance or dummy script will be much appreciated..

Please Help..!!!


Don't have an account?
Coming from Hortonworks? Activate your account here