Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
zahidrahim_ocp
Partner - Creator
Partner - Creator

Incremental Load on QVD

Dear Experts,

I have generated few QVD against few source tables and make dashboard for a given date. Now i want to setup incremental loads on these QVDs in Qlik Sense.

Please guide and help with step by step instructions as i am doing it for the first time.

Regards,

Zahid Rahim

23 Replies
tajmohamed30
Creator III
Creator III

LastExecTime is nothing but your last DB updated date and storing it into a variable, we use $ expansion to evaluate the variable where we have stored our updated DB date

zahidrahim_ocp
Partner - Creator
Partner - Creator
Author

Dear Taj,

You mean to say i have to store LastExecTime from the QVD file every time before loading data from base table and using the incremental load script?

if Yes can i have a piece of code to store lastExecTime from QVD.

Regards,

Zahid Rahim

tajmohamed30
Creator III
Creator III

hope you got the solution

zahidrahim_ocp
Partner - Creator
Partner - Creator
Author

I just need further explanation.

I have a qvd generated during Full load with Last_Update_Date column in the table.

Now to run incremental load Do i need to get/read Last executed load time from the qvd file and store in LastExecTime variable and use in the script to get records later than this lastExecTime?

tajmohamed30
Creator III
Creator III

if your DB has Last_Update_Date column then you can find max of that date and use it in your incremental load of QVD

zahidrahim_ocp
Partner - Creator
Partner - Creator
Author

Dear taj,

sorry to disturb you again and again But can you please write a simple incremental load script for me if suppose i have run a full load using below script.

/* Initial Full Load   */

[qlik_inc_load]:

SQL Select

    Id,

    TrDate,

    Name,

    Amount,

    last_update_date

FROM apps.qlik_inc_load;


STORE qlik_inc_load INTO [Lib://LIB_QVD/qlik_inc_load.QVD] (qvd);

I will be really thankful as i am very much new to Qlik.

tajmohamed30
Creator III
Creator III

what kind of DB you have and whether it is you going to do insert alone or update and delete records, have you tried creating the incremental scripts from links shared by Michele De Nardi and whether it have worked for you

zahidrahim_ocp
Partner - Creator
Partner - Creator
Author

I am using Oracle DB. Yes the links provided are very much helpful. i am just confused to calculate the LastExecTime.

tajmohamed30
Creator III
Creator III

Please see the sample coding for insert only below which taken from Using QVD files for incremental load ‒ QlikView (for more you can visit the link)

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;

A field ModificationDate (or similar) is required for QlikView to recognize which records are new.

zahidrahim_ocp
Partner - Creator
Partner - Creator
Author

How these variables will get populated?

LastExecTime

BeginningThisExecTime