Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
qliklearnervir
Creator
Creator

More than 100 file in Incremental load!!!!

Hi ,

We are working on 1 scenerio where after loading the initial data , we need to load more than 100 file but each and every file should load in incremental load manner.

FIle names are like   AP_Guest_20161201  to AP_Guest_20170323 ......

QVD name    AP_Guest.QVD.

please suggest the programming so that we can achieve the same.

7 Replies
vinieme12
Champion III
Champion III

for i = 20161201 to 20170323

vFileName = 'AP_Guest_' & $(i);

Your load script

Load from file 'xxxxx\$(vFileName)';

Next i;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
qliklearnervir
Creator
Creator
Author

but how i can manage incremental load scenario for each and every file.

Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

for each file in filelist('mydirectory\AP_Guest_*')

LET vFileDate = subfield('$(file)', -1);

if $(vFileDate) >=20161201 and $(vFileDate) <=20170323 then

  Load * from $(file);

endif

next file

Help users find answers! Don't forget to mark a solution that worked for you!
vinieme12
Champion III
Champion III

we are looping thru each of the file!

1st) Load Initial table

Load * From 20161201

2nd)

for i = 20161202 to 20170323

vFileName = 'AP_Guest_' & $(i);

concatenate

$(1)table:

Load *

from file 'xxxxx\$(vFileName)'

Where not exists(YOURKEYFIELD);

Next i;

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
qliklearnervir
Creator
Creator
Author

I think it should be like that:

first we need to load file

than Concatenate

Qvd file with where not exist(key filed);

can you suggest me this code in some brief.....

qliklearnervir
Creator
Creator
Author

HI Vineeth,

I have already loaded qvd file and now i just want incremental scenerio ...insert and update ...

but while running below script only insert scenerio is working not update.

please suggest how to make the scenario like :

every day file should load with qvd with insert and update and scenerio and so on

like 1st file should be Basic_20170315 in qvd than Basic_20170316 with insert and update scenerio and need to update the data as desired.


scrip code given below:

===============================================

for i = 20170315 to 20170317

vFileName = 'Basic_' & $(i);

Basic:

LOAD *

FROM

$(vPath)$(vFileName).xlsx

(ooxml, embedded labels, table is Sheet1);

Concatenate

LOAD *

FROM

$(vPath)Basic.qvd

(qvd)

where not Exists(id);

Store Basic into $(vPath)Basic.qvd(qvd);

next i;