Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
master_student
Creator III
Creator III

Incremetal Load script

Hello everyone,

Who can post a simple incremetal load script (insert only)

Thank you

7 Replies
tresesco
MVP
MVP

The Help could.

Insert Only (No Update or Delete)

QV_Table:

SQL SELECT PrimaryKey, X, Y FROM DB_TABLE

WHERE ModificationTime >= #$(LastExecTime)#

AND ModificationTime < #$(BeginningThisExecTime)#;

Concatenate LOAD PrimaryKey, X, Y FROM File.QVD;

STORE QV_Table INTO File.QVD;

Does this help?

makrishnaraj
Contributor III
Contributor III

Hi

Hope this is helpful

You will have to use the below statement to get rid of duplicate records.

WHERE NOT exists(PrimaryKey);


Table1:

SQL SELECT PrimaryKey, A, B, DateTimeField FROM DataBaseTable

WHERE DateTimeField >= $(LastExecTime);

Concatenate LOAD PrimaryKey, A, B, DateTimeField FROM DestFile.QVD

WHERE NOT exists(PrimaryKey);

STORE Table1 INTO DestFile.QVD;

gautik92
Specialist III
Specialist III

master_student
Creator III
Creator III
Author

I don't have PrimaryKey in my table

how to get $(LastExecTime)?

gautik92
Specialist III
Specialist III

I faced the same issue ..we cant do incremental load without Date and Primary ID We shud have atleast one

if primary ID is not there try with Date.

If you want to do oly insert WHERE NOT exists(PrimaryKey) not needed

remove that from script and try t

master_student
Creator III
Creator III
Author

Thanks

How to get the last updated time $(LastExecTime)?

gautik92
Specialist III
Specialist III

Contact Database Team and tel them to add the Date Field