Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
My source is DB, where i will have all the record, if i have an item abc ,in which modified date as today, and tomorrow if its modified then new record will get created, but it wont replace the older one...so for an item we will have 2 records and while loading the data in qvd we need to get the latest one...but during the load the old record has already has been updated in qvd. How can i replace that with the new one.
Thank you
How can i acheive that?
Take a look at incremental loading examples.
Loading new and updated records with incremental load ‒ Qlik Sense on Windows
This is a case of updated data.
You load your new/modified data first, but should only concatenate from qvd, where your key does not exist.
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;
Hi ,
thanks for the reply,
for example:
I'm having 4 rows of data like below
Item | country | Modified date |
1234 | India | 27-07-2020 |
3456 | Canada | 28-07-2020 |
5676 | USA | 30-07-2020 |
7890 | Canada | 01-08-2020 |
on first reload the above data will be saved in qvd. now the update will be like addition of 2 rows within that one is a new record another one is as same as old record but only modified date will get change(last row)
Item | country | Modified date |
1234 | India | 27-07-2020 |
3456 | Canada | 28-07-2020 |
5676 | USA | 30-07-2020 |
7890 | Canada | 01-08-2020 |
9876 | Sweden | 01-09-2020 |
1234 | India | 28-07-2020 |
Now in the last row the record is same , only change is modified date, in this case if we do concatenate it will add all the rows and it will save it in qvd, but I want to delete the existing record and add the new record and save it in qvd. how can I achieve this?
//load data
data:
load *
from data_source
;
//limit to just current row for each item id
inner join (data)
load
Item,max([Modified date]) as [Modified date]
resident data
group by Item;