Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Append incremental load

Hi Al, 

Please find the attcahment of the QVD and the sample data of excel attached. 

I am trying to have a incremental load by appendin the the new data to the old one . To do so i have scripted the incremental load as attached  but in this it is replacing the values ? I want to keep all the values as it is on top of that it should keep appending the new values . 

If you look at my data screenshot below  the first fetch .

ID's (A5 and A6) created on 19Nov2020 with status Open  and was updated on 29Nov2020 

I have stored this inofrmation QVD  after next reloading now the ID's (A5 and A6) have been updated on 1Dec20 and 02Dec20 with different status . 

and my output is just replacing them ? How can manage to keep all the previous records and then append the new one also . 

I want to append all the data  where Updated date is greater than previous update date.  

Can please someone help me in achieving this

smilingjohn_1-1606997236647.png

 

Thanks in Advance

 

1 Solution

Accepted Solutions
edwin
Master II
Master II

try instead of just using ID in PKEY, use ID & '|' & DATE(Updated,'D-MMM-YY') and use the same format in your not exist check

where not Exists(PKEY,ID & '|' & DATE(Updated,'D-MMM-YY') )

.  the reason it is excluding prior dates is bec the ID already exists in the new set.  but if it is combination of ID and UPDATE date then you preserve prior dates.

View solution in original post

1 Reply
edwin
Master II
Master II

try instead of just using ID in PKEY, use ID & '|' & DATE(Updated,'D-MMM-YY') and use the same format in your not exist check

where not Exists(PKEY,ID & '|' & DATE(Updated,'D-MMM-YY') )

.  the reason it is excluding prior dates is bec the ID already exists in the new set.  but if it is combination of ID and UPDATE date then you preserve prior dates.