How can I assign a unique number to an incoming row when there are several transformers running in parallel as displayed in the below embedded image. The unique number needs to be created for the rows coming from sequential files NOT after transformers as those are performing pivoting of data. The metadata of the sequential files are different.
[img]
http://postimg.org/image/bm4aawt4j/
[/img]
I tried implementing surrogate key generator stage to create a state file and then placed another transformer before the current transformer and used the NextSurrogateKey() in the transformer, as several transformers are running in parallel I couldn't implement this solution.
Also I tried using the below formula:
Code: Select all
(@INROWNUM - 1)*@NUMPARTITIONS+@PARTITIONNUM+1
Note: Once this job loads the target table, next job kicks off which also loads the same target table so the unique number should be continued from the previous job. Probably in the instance where we create a state file using the surrogate key stage should take care of this but want to mention it.
Any help would be appreciated.
Thanks.