Reputation: 3071
I am trying to get the current timestamp using the below in oozie:
<property>
<name>date</name>
<value>${coord:formatTime(coord:dateOffset(coord:nominalTime(), -1,
'DAY'), "yyyy-MM-dd")}
</value>
</property>
My hive action is:
<script>/abc/test.hql</script>
<param>DATE=${date}</param>
My Hive action fails saying:
EL_ERROR
No function is mapped to the name "coord:formatTime"
Any idea why it says so?I want my date as YYYY-MM-DD HH-MM-SS
Upvotes: 2
Views: 3134
Reputation: 500
${coord:formatTime(coord:dateOffset(coord:nominalTime(), -1, 'DAY'), 'yyyyMMdd')}
This works for me. Which version of oozie do you use ?
Upvotes: 1
Reputation: 5260
Use the documentation for coord:formatTime
6.8.2. coord:formatTime(String ts, String format) EL Function (since Oozie 2.3.2)
So probably your Oozie version is lower than 2.3.2 Also it's important to pay attention for the xmlns version inside your coordinator xml
xmlns:coordinator="uri:oozie:coordinator:
Hope this help
Upvotes: 1