Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
maternmi
Creator II
Creator II

How to create a history.qvd file?

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

Labels (3)
2 Replies
Taoufiq_Zarra

Hi,

I think you need an incremental load with insert only

 

dr_gen_QvdPic03_312x356.png

 

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,

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Brett_Bleess
Former Employee
Former Employee

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:

https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/QVD_Incremental...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.