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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Numeric.sequence per Job

Hi,
my JobA calls JobB via a tRunJob.
Within JobB, I've got a tJava where I call Numeric.sequence.
Unfortunately Numeric.sequence starts only the first time I call JobB with 1. But I want it to start from 1 everytime I call JobB.
From JobA I call tRunJob (JobB) via a OnComponentOK (because it's a tJava which calls tRunJob) - is this ok?
Within JobB I use:
id = Numeric.sequence ("s1", 1, 1);

(but it's in a routine and get's called from the tJava)
Is it somehow possible to reset id after JobB finished?
I found this: https://community.talend.com/t5/Design-and-Development/Numeric-sequence-reset/td-p/79915 but I have a subJob, do I have to do it like this, too?
Thank you in advanced.
Bye, Chris
Labels (3)
2 Replies
Anonymous
Not applicable
Author

Hi,
You can use the process id in the sequence name :
id = Numeric.sequence(pid, 1, 1);

It's explained here : http://www.talendforge.org/bugs/view.php?id=5665
Best regards,
Karine
Anonymous
Not applicable
Author

Hi Karine,
thank you for your reply.
Got it working now 0683p000009MACn.png