Getting current time in oozie workflow

I use the case where I need to pass the current date from oozie workflow to a pig script. I know that I can get the current date from the pig, but my condition is different from where I have to transfer it from oozie after the action is completed. Any ideas how to do this?

And also I have a coordinator work that will be done for every hour. So, how do you pass the coordinator's execution date to the workflow?

+4
source share
1 answer

I have to transfer it from oozie after completion of the action. Any idea how to achieve this?

You can use the Oozie WL function String timestamp() from the manpage

UTC W3C (YYYY-MM-DDThh: mm: ss.sZ). I.e.: 1997-07-16T19: 20: 30.45Z

,

<property>
<name>the_timestamp</name>
<value>${timestamp()}</value>
<property>

, - , echo capture-output .

, . , , , ,

+5

Source: https://habr.com/ru/post/1526709/


All Articles