Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, new day new problem.
I want to create a process that loop a job that I already developed as follow:
Here's my problem: my table out_004_001_out_ici_versamenti_all has a column year, and I want to excute this job n times as many years I have.
In Java I've already done something similar: I read the minimum and the maximum year, then i write a for that cycle between them and I modify the query to match the current year I'm iterating.
I could also read a distinct of the year, save them into an array, and use said array to loop.
Is there a way to save my data into an array ad use this array's length in the loop component?
For example, my minimum year is 2012 and maximum year is 2022, so i want to Loop the job 11 times, and every time setting the where clause in the job to match the current year
I solved the problem using a tFlowIterate: I read the distinct of the year with the tdbInput compenent, I've linked it to the tFlowIterate component and eventually to the tRunJob.
On the TrunJob component, I've used a context variables in which I save the year read in the distinct query. I've called this variable in the child parent to loop whithin every year saved.
I solved the problem using a tFlowIterate: I read the distinct of the year with the tdbInput compenent, I've linked it to the tFlowIterate component and eventually to the tRunJob.
On the TrunJob component, I've used a context variables in which I save the year read in the distinct query. I've called this variable in the child parent to loop whithin every year saved.
Hello,
Thanks for letting us know you've resolved your issue by yourself and sharing your solution with us on Community.
Best regards
Sabrina