Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need to create a history.qvd file where I can store new data after each reload. The data is almost the same, only the timestamp is different.
Name, timestamp
Initial Load: Paris, 15.12.2019 11:47:16
Madrid, 15.12.2019 11:47:16
1.Reload: Paris, 15.12.2019 11:47:16
Paris, 16.12.2019 12:00:00
Madrid, 15.12.2019 11:47:16
Madrid, 16.12.2019 12:00:00
2.Reload: Paris, 14.12.2019 11:47:16
Paris, 15.12.2019 12:00:00
Paris, 16.12.2019 11:59:00
Madrid, 14.12.2019 11:47:16
Madrid, 15.12.2019 12:00:00
Madrid, 16.12.2019 11:59:00
and so on… Who knows how to solve it?
BR
Hi,
I think you need an incremental load with insert only
First you load the first data and create your (qvd)
let LastExecTime=now();
Source:
LOAD * INLINE [
Town, Date
Paris, 15.12.2019 11:47:16
Madrid, 15.12.2019 11:47:16
];
store Source into history.qvd;
And for the new data every time you do:
let LastExecTime=now();
Source:
LOAD * INLINE [
Town, Date
Paris, 15.12.2019 11:47:16
Madrid, 15.12.2019 11:47:16
Madrid, 15.12.2019 11:47:16
Madrid, 16.12.2019 12:00:00
];
Concatenate
LOAD Town,
Date
FROM
.\history.qvd
(qvd);
STORE Source INTO history.QVD;
You can use the LastExecTime filter by adding a column where you indicate the loading date so as not to concatenate existing data.
as in this example
Example: QV_Table: SQL SELECT PrimaryKey, X, Y FROM DB_TABLE WHERE ModificationTime >= #$(LastExecTime)# AND ModificationTime < #$(BeginningThisExecTime)#; Concatenate LOAD PrimaryKey, X, Y FROM File.QVD (qvd); STORE QV_Table INTO File.QVD;
Cheers,
Did Taoufiq's answer get you what you needed? If so, do not forget to return to your thread and use the Accept as Solution button on his post to give him credit for the assistance as well as let other Community Members know it did work for your use case. If you still need further assistance, leave an update.
Here is a Design Blog post link that may provide some further help with a video as well.
https://community.qlik.com/t5/Qlik-Design-Blog/Overview-of-Qlik-Incremental-Loading/ba-p/1466780
Full Help link on QVD incremental loading too, believe Taoufiq used part of this, but giving you the entire link too:
Regards,
Brett