Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
I have a job which brings back lists from a website.
For each list that is brought back, I am feeding the lists into SQL database tables (a table for each list).
The tables are created by the tDBOutput component (table dropped and recreated each time).
I am trying to apply a numeric sequence for each of the lists to set an ID column. It is working fine, except the fact that the numeric sequence does not get reset for each row the flow iterates over.
For example, list 1 contains 10 rows, so the ID column for Table1 has IDs 1 to 10
The table for List2 start its numeric sequence then at 11, instead of resetting to 1.
This is screenshot of my job
Here's the tMap that applied the numeric sequence
Why doesn't the numeric sequence reset to 1 for each row the flow iterates over? and how to I make sure each table's numeric sequence starts at 1 ?
Thanks in advance
Steve
Hi
You need to set a dynamic sequence name, eg:
Numeric.sequence(""+((Integer)globalMap.get("tFlowToIterate_1_CURRENT_ITERATION")),1,1)
Then, the sequence will start from 1 for each iteration.
Regards
Shong
Hi
You need to set a dynamic sequence name, eg:
Numeric.sequence(""+((Integer)globalMap.get("tFlowToIterate_1_CURRENT_ITERATION")),1,1)
Then, the sequence will start from 1 for each iteration.
Regards
Shong
Thanks @Shicong Hong I will give this a try.
Hi @Shicong Hong
I have now tried this, and this has sorted the issue. Many thanks for your help.
Regards
Steve