Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
cfountain72
Creator II
Creator II

Incremental QVD Load

Hello, 

I would like to have Load Script that first checks to see if the qvd exists and/or has any rows in it.

If it doesn't, then perform a full load.

If it does, it would skip ahead to load a shorter timeframe to add.

I've tried a few versions, but I keep getting zero rows back in my qvd.

Any suggestions?

Labels (2)
3 Replies
anat
Master
Master

you try something like below:

if FileSize('lib://Reports/PBAData.qvd')>0 THEN

PBAData:
Load
*
FROM [lib://Reports/PBAData.qvd] (qvd);

MaxTable:
Load max("WorkflowID") as MaxID
Resident PBAData;

Let MAXID = num(peek('MaxID',0,MaxTable));
drop table MaxTable;

LIB CONNECT TO 'Original_database';


Concatenate(PBAData)
//NewRecordData

SQL SELECT WorkflowID,
ActiveID,
Activitynumber
FROM Knowdatabase.workflowtable where
workflowid > $(MAXID);

STORE PBAData into 'lib://FC_KYC_Reports/PBAData.qvd' (qvd);

Else
LIB CONNECT TO 'Original_database';

PBAData:

SQL SELECT WorkflowID,
ActiveID,
Activitynumber
FROM Knowdatabase.workflowtable;

Store PBAData into 'lib://FC_KYC_Reports/PBAData.qvd' (qvd);

End IF

Pierrick
Partner - Contributor III
Partner - Contributor III

Hello,

you can use QvdNoOfRecords function.

Exemple :

If QvdNoOfRecords('lib://folder/file.qvd')>0 then
    //partial load
else
    //full load
endif
anat
Master
Master

as suggested by @Pierrick ,you can use   QvdNoOfRecords or QvdCreateTime or FileSize functions in load script to check QVD is present or not.....

 

https://help.qlik.com/en-US/sense/November2023/Subsystems/Hub/Content/Sense_Hub/Scripting/FileFuncti....