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: 
Venkata_Sivaji1
Contributor
Contributor

How to generate sequence of numbers to get surrogate key

Team,

I am new to talend. I need help in below scenario.

I have a simple job case like below.

Job :- Job_Product_Details_Data_Details.

Above job will run on weekly basis and monthly basis.So when it run on first week , it should generate sequence number through the below function.And assume some number 1 to 100 created.From next run it should create from 101 and so on.

Function :- numeric.sequence("s1",1,1) 

I want to create from 101 and so on from next week run so i used below function in job instead of above function. But it is throwing compilation error.

Function :- numeric.sequence("s1",s1.nextval,1) 

Is there any functionality  in talend to call data base sequence to get sequence.nextval()?.

Thanks in Advance!

Labels (3)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

You need to use the tDB component related to your database engine to access the current or next sequence value. Else, store the last used value into a file when the job finished.

View solution in original post

1 Reply
TRF
Champion II
Champion II

You need to use the tDB component related to your database engine to access the current or next sequence value. Else, store the last used value into a file when the job finished.