Getting current time in oozie workflow

DMA

I've a use case where I need to pass the current date from oozie workflow to pig script. I know that I can get the current date from pig, but my condition is different where in I've to pass it from oozie after an action is complete. Any idea how to achieve this?

And also I've a coordinator job, which will execute for every hour. So how to pass the coordinator execution date to the workflow?

Suvarna Pattayil

I've to pass it from oozie after an action is complete. Any idea how to achieve this?

You can use Oozie WL Function String timestamp() From the manpage,

It returns the UTC current date and time in W3C format down to the second (YYYY-MM-DDThh:mm:ss.sZ). I.e.: 1997-07-16T19:20:30.45Z

You can use this as a property,

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

Also, if your action is a Shell Action you can echo the time from within the code and use capture-output to use it further.

I don't know how to handle the second query. All I know is the properties file of the co-ordinator is used by the workflow,

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Getting current time in oozie workflow

From Dev

Hadoop Oozie Workflow not getting Coordinator properties

From Dev

Getting current time in php

From Dev

Getting Current date and time

From Dev

Oozie coordinated workflow

From Dev

Oozie coordinated workflow

From Java

Getting current date and time in JavaScript

From Dev

Getting current time using boost

From Java

Getting the current date and or time in Elixir

From Dev

Getting the current date (and time) in Django

From Dev

Android: Getting the current date and time

From Dev

Getting current time using boost

From Dev

Getting the current date (and time) in Django

From Dev

Issue with getting current time and current timezone in WordPress

From Dev

MapReduce oozie workflow using Hue

From Dev

Oozie workflow.xml error

From Dev

Add CLASSPATH to Oozie workflow job

From Dev

Oozie Workflow with Pig, Hive and unix

From Dev

Case conversion from oozie workflow

From Dev

How to use a Oozie job property in a Oozie workflow EL function?

From Java

Getting Current date, time , day in laravel

From Dev

Getting the current time without a script task

From Dev

Getting current time in seconds/milliseconds with SPARQL?

From Dev

Getting the current date/time on an android device

From Dev

Not getting correct current time in PHP using date()

From Dev

Getting milliseconds accuracy current time in Qt

From Dev

Getting Current Time of a Video (Player - Swift)

From Dev

Getting Current Date and Time of a Specific Country

From Dev

Getting current time in seconds/milliseconds with SPARQL?