Quarter month loop

Highlighted
Seven Stars

Quarter month loop

 
 
I want to make DT  loop thrice each quarter for all 3 months in the previous quarter. In other words, when runs on 4th calendar day  it should produce data for Jan, Feb and Mar . How can i achieve running job every quarter month

select col 1 , col2 from table A 
WHERE(DT1 >=  '2018-12-01' AND DT<=  '2018-12-31')
Six Stars

Re: Quarter month loop

why donot you use database property

to run same query in tloop(i)

select xxxx where DT = add_months(sysmonth ,-i)

write in a separate file in each time.

to schecule this quaterly you can use cron trigger on jon conductor
Regards
Abhishek KUMAR
Seven Stars

Re: Quarter month loop

Yes i tried using database to get dates but i am unable to filter in tmap using context variable as below 

 

!row4.INDATE.before("context.FIRST_DAY_OF_1ST_QUARTER") &&
!row4.INDATE.after("context.LAST_DAY_OF_1ST_QUARTER")

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.