Similar would be against nominal time.
${coord:formatTime(coord:dateOffset(coord:nominalTime(),
-1,’HOUR'),'yyyy-MM-dd')}
${coord:formatTime(coord:dateOffset(coord:nominalTime(), -1,’HOUR’),’HH’)}

Mention this as property

<property>
<name>lasthour</name>
<value>
${coord:formatTime(coord:dateOffset(coord:nominalTime(), -1,’HOUR’),’HH’)}
</value>
</property>

Visit the doc for more details.
https://oozie.apache.org/docs/3.1.3-incubating/CoordinatorFunctionalSpec.html


Regards,
Jaydeep



On Tue, Jan 5, 2016 at 8:15 AM, Satyajit <[email protected]> wrote:

> I want to have date and hour as  parameter to my hive workflow for previous
> hour.
> How can i replicate this in Ozzie coordinator. can you some one help.
>
> In Linux
>
> LoadDate=`date -d '1 hour ago' "+%Y-%m-%d"`
> LoadHour=`date -d '1 hour ago' "+%-H"`
>
>
> So at midnight , it will be previous day and hour is 23 and so on.
>

-- 
_____________________________________________________________
The information contained in this communication is intended solely for the 
use of the individual or entity to whom it is addressed and others 
authorized to receive it. It may contain confidential or legally privileged 
information. If you are not the intended recipient you are hereby notified 
that any disclosure, copying, distribution or taking any action in reliance 
on the contents of this information is strictly prohibited and may be 
unlawful. If you have received this communication in error, please notify 
us immediately by responding to this email and then delete it from your 
system. The firm is neither liable for the proper and complete transmission 
of the information contained in this communication nor for any delay in its 
receipt.

Reply via email to