Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sequence Generator not working properly.

I am trying to use sequence generator in tMap with the below syntax.

 

Sequence_Generator.sequence("s1",1,1) 

 

If my input has 10 rows, it gives me a correct sequence number starting from 1 to 10 but if i delete my output filer and re-run the job, again it starts with 1 rather than starting with 11.

 

Can anyone please help here?

 

Thanks in Advance!

Labels (2)
8 Replies
fdenis
Master
Master

your Sequence Generator can only see the job thread (it run on thread memory).
Il you want a permanent index you have to store it into file or database.
Regards,
Anonymous
Not applicable
Author

Is there no component similar to sequence generator transformation in informatica?

fdenis
Master
Master

you can do it adding Sequence Generator to offset but you have to store offset.
I think informatica store offset in db.

BUT
if it's to have an unique id in db you have to generate it on db (getNextId or auto inrement) .
if it's to Have an id in file you have to open file get the max id then insert data.
if it use to merge or reive data in hashmap use local sequence generator .

what do you need?
Anonymous
Not applicable
Author

I wanted to store this as an offset somewhere. I was checking if Talend have some inbuilt component to do it.

 

Will tAddCRCRow Component would help in this case?

fdenis
Master
Master

why not.
but,why dont you use a db sequence?
if you need uuid you can also write a function.!
TRF
Champion II
Champion II

I suggest you to store it as a context variable.

See tContextDump / tContextLoad components for that.

Anonymous
Not applicable
Author

Thank you so much for all your replies!!

I think I might have to use a context variable..