Five Stars

Incremental Surrogate Key

We have an column in Database which is Primary Key. We want to load this using Numeric.sequence(s1,1,1) But problem is in 2nd Run the value of column will start again from 1. How to start it after the last Value generated in Last Run. 

3 REPLIES
Five Stars

Re: Incremental Surrogate Key

Try to get the max value of the primary key column from that table at the start of the job, Store it in a variable and then increment it for each record. 

 

Five Stars

Re: Incremental Surrogate Key

Let's Say I am taking Max(column) in toraclerow at the start of the Job.So in tmap is it should be like Numeric.sequence(s1,Max(Column),1)?

Five Stars

Re: Incremental Surrogate Key

Yes Abhi.