Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
qliklearnervir
Creator
Creator

incremental load for more than 1 file !!!!!!!!!!!

We are working on 1 scenario where after loading the initial data , we need to load multiple  files but each and every file should load in incremental load manner like 1st file than 2nd file ans so on and follow the inser+update scenario.

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

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

please suggest how to make the scenario like :

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

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



script 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;

14 Replies
Anil_Babu_Samineni

Then what does the mean of your comment

  1. LOAD * 
  2. FROM 
  3. $(vPath)Basic.qvd 
  4. (qvd); 
Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
adamdavi3s
Master
Master

Anil Babu Samineni wrote:

Then what does the mean of your comment

  1. LOAD * 
  2. FROM 
  3. $(vPath)Basic.qvd 
  4. (qvd); 

I've used exactly the code which the OP has used, and works and makes sense.

It is unnecessary to make any changes to this, when the code is fine

LOAD *

FROM

$(vPath)Basic.qvd

(qvd)

Anil_Babu_Samineni

True, that is my intend to show over here.

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
qliklearnervir
Creator
Creator
Author

HI vineeth,

can you give me some code snapshot for use do loop until instead of for loop to reverse the order ....this is bit urgent.please help.

the code lgic is similar as given in above code.

vinieme12
Champion III
Champion III

Try below


for i = 20170317 to 20170315 Step -1

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);


Drop table Basic;

next i;

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