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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Generating primary key sequence number for incremental load

I am using numeric sequence to generate primary key in a sequence. This works okay for a total load.

But if I have to do any updates, then it overwrites the existing values.

I tried using Numeric.sequence("s1",(integer)globalMap.get("maxrow"),1).

I used taggregateRow to get the max of the particular column and directed it to tsetGlobalVar but whenever I run the job, I get the error that numeric sequence accepts only integer and not object.

Can anyone help me through this? Or are there any better way to do this?

 

Labels (1)
  • v7.x

1 Solution

Accepted Solutions
TRF
Champion II
Champion II

Try this one:

Numeric.sequence("s1",(Integer)globalMap.get("maxrow"),1)

View solution in original post

3 Replies
TRF
Champion II
Champion II

Try this one:

Numeric.sequence("s1",(Integer)globalMap.get("maxrow"),1)
Anonymous
Not applicable
Author

Hi,

Thanks. It works now.

Anonymous
Not applicable
Author

Hi,

I still have an issue. I am passing my rows through taggregate row and getting the max using tsetvariable. But when I call the global variable inside my expression builder, its value is null but when I pass it through tlogrow, it gives the correct value. Can you help me with this?0683p000009M7ip.png0683p000009M848.png