Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Please see the Cloudera blog for information on the Cloudera Response to CVE-2021-4428

How to pass partition datetime variable to hive scrip when using Oozie Workflow?

hi All,

I am using Oozie:Hive workflow. How can I pass the partition datetime variable in hive script? I have my Oozie workflow and hive script below:

workflow:

<action name="hive-node"> <hive xmlns="uri:oozie:hive-action:0.2"> <job-tracker>${jobTracker}</job-tracker> <name-node>${nameNode}</name-node> <configuration> <property> <name>mapred.job.queue.name</name> <value>${queueName}</value> </property> </configuration> <script>script.q</script> </hive> <ok to="end"/> <error to="fail"/> </action>

script.q

LOAD DATA INPATH '/dir/myload/' OVERWRITE INTO TABLE test_db.test_tmp; INSERT INTO TABLE test_db.test_tmp Partition (datehour=howtopassdatetimehere) SELECT * FROM test_db.test_tmp;

Please help I am new to Oozie

Thanks

JN

0 REPLIES 0