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

Announcements
FLASH SALE: Save $500! Use code FLASH2026 at checkout until Feb 14th at 11:59PM ET. Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
nikhilgarg
Specialist II
Specialist II

Incremental load

Hello,

Does for incremental load in our database, we must have a date field telling last updated date ?

And if we don't have last updated date field, then is there any way for doing incremental load?

Thanks

Labels (1)
3 Replies
swuehl
Champion III
Champion III

It will depend on which incremental load scenarios (add, update, delete records) you need to handle.

Then you need to identify a primary key in your source table, if this primary key is for example an OrderID and the OrderID will be incremented by new orders, you can pretty much translate the approach using a last updated date to your setting with OrderID ( ...WHERE OrderID > $(vMaxOrderIDFromQVD) ) [but not for all scenarios like updated records].

nikhilgarg
Specialist II
Specialist II
Author

Ohk,

U mean:

1: For Insert, apart from date field we can use primarykeyfield(Orderid) instead of date field to load newly added data.

2: For update, date field required

3: No date field required, We need to make inner join with primary key.

swuehl
Champion III
Champion III

Mostly like that.

1. will work best if your primary key is somehow incremented by each new record and you can use a simple comparison in a WHERE clause to your DB LOAD statement (like I tried to show above).

It will be much more complicated / less efficient if your available primary keys are unique but somewhat randomly distributed across value range.