How to loop through date variables in PDI?

57 views Asked by At

So I have a job where first transformation step is "declaring date variables"

and I need to use 2 date variables as a range to create a loop between date_from and today ( 7 days range )

so the next transformation step "temp1" would use the date ranges in a input step to get and run through a loop of last 7 days

First part in "declaring date variables" is

get system info step

getting start date = week_from > end date = today, however I am lost on how to do the rest through calculation step to increment etc and get 7 days dates

and next part I want know how to use the said dates to run the job through a loop ?

currently I simply get all past 7 days like this :

and dtJornada >= '${LAST_WEEK}' and dtJornada < '${CURRENT_DAY}

but the new condition I have for this task is to make it a loop so how would the transformation run once through each date?

1

There are 1 answers

1
Rishu S On

You can use the Copy rows to Result step to loop through the generated date values. You can refer to this blog post for further details.