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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
madhubabum
Creator
Creator

How we can Perform Update(only) in incremental load ?

Hi Experts

How we can Implement Update only in Incremental load ?

Note : Ignore Insert records (Perform only Update )

Thanks

Madhu

10 Replies
effinty2112
Master
Master

Hi madhu,

               I thought the script I gave you was too long and could have been made shorter. It can and here it is:

OldDataSet:

Load

*,

Hash128(Key & '|' & Hours & '|' &  Status) as HashKey;

Load * Inline [

Key, Hours, Status

100, 2, Completed

101, 3, Completed

102, 4, Pending];

NoConcatenate

ModifiedData:

Load

*

Where Exists(Key) and Not Exists(HashKey);

Load

*,

Hash128(Key & '|' & Hours & '|' &  Status) as HashKey,

Key as ModKey;

Load * Inline [

Key, Hours, Status

100, 2, Completed

101, 3, Completed

102, 10, Completed

103, 5, Completed];

Drop Field HashKey;

NoConcatenate

NewDataSet:

Load * Resident OldDataSet Where Not Exists(ModKey, Key);

DROP Table OldDataSet;

Concatenate (NewDataSet)

LOAD Key, Hours, Status Resident ModifiedData;

DROP Table ModifiedData;