I have a Oozie workflow which has three parameters that expect a day, month and year respectively. This workflow works perfect with manual input. I am now looking for a coordinator which daily runs this workflow and automatically fills in these parameters with the current day, month and year.
I already tried ${DAY}
, ${MONTH}
and ${YEAR}
which Hue seemed to propose but I get the following error when submitting the coordinator with e.g. ${MONTH}
as value for my month parameter.
E1004: Expression language evaluation error, Unable to evaluate :${MONTH}:
I am trying this on CDH 5.8.
I found the answer myself with something Hue also suggested to me.
So ${DAY}
, ${MONTH}
and ${YEAR}
were not the way to go.
The following values however did solve my question:
${coord:formatTime(coord:nominalTime(),'dd')}
${coord:formatTime(coord:nominalTime(),'MM')}
${coord:formatTime(coord:nominalTime(),'yyyy')}