Search code examples
hadoopoozie

No function is mapped to the name "coord:formatTime"


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


Solution

  • ${coord:formatTime(coord:dateOffset(coord:nominalTime(), -1, 'DAY'), 'yyyyMMdd')}
    

    This works for me. Which version of oozie do you use ?