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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Generating Row_number as key field for DB load

Hi,

I'm new to talend and in the process of learning it. I came across a problem where the DB table has to be loaded with data which doesn't have a key column. I want to add a row_num which would act as the key value. The issue is the Row_num needs to be continuous from the previous run.

I could use the tRow_generator to generate the row_num. But how to configure it to generate values starting from the previously generated Row_num between runs? Can anyone help please?

 

Sample data:

Run1:

Row_num

1

2

3

Run2:

Row_num

4

5

6

 

Labels (2)
1 Reply
TRF
Champion II
Champion II

Select the current max value from the dB and store the result into a global variable.
Then use a numeric.sequence with a start value based on the global variable value + 1.
No need of tRowGenerator.