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: 
Not applicable

Incremental Load

Hi, I am new to Qlickview and have a requirement to perform Incremenal load ( insert & Update) at work.  I have got idea on how Incremental load works by looking blwo scripts:

Script Example:

QV_Table:

SQL SELECT PrimaryKey, X, Y FROM DB_TABLE

WHERE ModificationTime >= #$(LastExecTime)#;

Concatenate LOAD PrimaryKey, X, Y FROM File.QVD

WHERE NOT Exists(PrimaryKey);

STORE QV_Table INTO File.QVD;

Below is kind of data I have, shown in excel screen shot ( see attached JPG) file. In that data, Request Id is Non Primary Key and it can be repeted due to Program Name.   If I have this kind of data, how can I use Incremantal load ?? As it requires Primary Key in NOT Exit clause.  Please Help.

Thank you.

1 Solution

Accepted Solutions
maxgro
MVP
MVP

can you use Request Id and Program Name as primary key?

if yes you can concatenate these 2 fields

QV_Table:

Load *,

[Request Id] & [Program Name] as NewPK;

SQL SELECT X, Y FROM DB_TABLE

WHERE ModificationTime >= #$(LastExecTime)#;

Concatenate LOAD NewPK, X, Y FROM File.QVD

WHERE NOT Exists(NewPK);

STORE QV_Table INTO File.QVD;

View solution in original post

2 Replies
maxgro
MVP
MVP

can you use Request Id and Program Name as primary key?

if yes you can concatenate these 2 fields

QV_Table:

Load *,

[Request Id] & [Program Name] as NewPK;

SQL SELECT X, Y FROM DB_TABLE

WHERE ModificationTime >= #$(LastExecTime)#;

Concatenate LOAD NewPK, X, Y FROM File.QVD

WHERE NOT Exists(NewPK);

STORE QV_Table INTO File.QVD;

Not applicable
Author

Thank you Massimo Grossis. It worked. Not sure why I did not think about that .