Parameterization of Coordinator jobs
These functions are used to control Datasets, which are used for processing or produced as part of Coordinator processing.
dateOffset(String baseDate, int instance, String timeUnit)
This function calculates the datestamp based on the following calculation:
newDateStamp = baseDateStamp + (instance*timeUnit)
It offsets the baseDateStamp value by the amount given by instance and timeUnit.
The timeUnit value can be one of the following:
YEAR
MONTH
DAY
HOUR
MINUTE
Consider the following example:
${coord:dateOffset(coord:nominalTime(), 2, 'DAY')}
If nominal time is 2015-08-22T23:00Z
, then after the new calculation the output will be 2015-
08-24T23:00Z
.
dateTzOffet(String baseDate, String timezone)
This function calculates the datestamp based on the following calculation:
newDateStamp = baseDateStamp + (Oozie Processing Timezone - Given Timezone)
It offsets the baseDateStamp value by the difference from Oozie processing timezone to the timezone passed as argument.
You can...