How to get the first day of the month in input-events in oozie coordinator?

388 Views Asked by At

I need to configure data waiting for the whole previous month. How to get the first day of last month in start-instance if the start is on 2nd of month?

   <input-events>
        <data-in name="WAIT_DS" dataset="DS">
            <start-instance></start-instance>
            <end-instance>${coord:current(-2)}</end-instance>
        </data-in>
    </input-events>
1

There are 1 best solutions below

0
Григорий On

I found a solution:

<start-instance>${coord:current( -(coord:daysInMonth(-1) -2) )}</start-instance>