Quarter month loop

Eight 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')
Eleven 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
Eight 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")

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog