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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Incremental load with two load statements

My initial load looks like below. Works just fine.

However when Im applying an incremental load approach, the second load does not work properly.

Pls see attached QV-file.

Any ideas why?

CSVLIST:
LOAD
    
textbox22 as BANKNAME,
    
IF(textbox18='EUR', RIGHT(Account_1,8),RIGHT(Account_1,7)) as ACC,
    
textbox18 as CCY,
    
Ref1 as REF,
    
DATE(Val_Date, 'MM/DD/YYYY') as VD,
    
IF(DC='DEBIT',Amount*-1,Amount*1) as AMOUNT,
    
Filename() as FILENAME,
    
IF(RIGHT(FILENAME(),3)='csv','CSV LIST') as SOURCE,
    
IF(RIGHT(FILENAME(),3)='csv','New transaction') as [TRANSACTION STATUS],
IF(RIGHT(FILENAME(),3)='csv','YES') as [ILM RESPONSIBLE],
Closing_Balance_Date as [REPORT DATE]
    
    
FROM
$(vSourceData)*.csv
(
txt, unicode, embedded labels, delimiter is ';', msq)
WHERE Account_1 <> '8840039250-500150' and Amount<>'' ;


Concatenate LOAD
    
textbox22 as [EOD BANK NAME],
    
IF(textbox18='EUR', RIGHT(Account_1,8),RIGHT(Account_1,7)) as [EOD ACC],
    
textbox18 as [EOD CCY],
    
Closing_Balance_Date  as [EOD BALANCE DATE],
    
IF(DC_Bal2='Debit',Closing_Balance *-1, Closing_Balanceas [EOD BALANCE],
    
Filename() as [EOD FILENAME]
    
FROM
$(vSourceData)*.csv
(
txt, unicode, embedded labels, delimiter is ';', msq)
WHERE Account_1 <> '8840039250-500150';

STORE CSVLIST into $(vSaveQVD)CSV.qvd(qvd);
DROP TABLE CSVLIST;

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Just an idea: are you sure that on tab CSV - MAIN QVD LOAD the second load doesn't AUTOCONCATENATE? Try with the NOCONCATENATE prefix.

View solution in original post

5 Replies
Not applicable
Author

Anyone pls? 

Peter_Cammaert
Partner - Champion III
Partner - Champion III

I don't get it (my bad). At first, you're reading entire csv files and storing them in a QVD. The next time around, you're doing just the same. Where is the incremental part, that starts from a previously created QVD and only adds the new lines from the csv's?

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Sorry, wasn't looking at the script in your document.

You're saying that the incremental part doesn't work. Any idea where it fails, or what exactly it fails to do well? There are no source files included, so it's a bit difficult to test.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

Just an idea: are you sure that on tab CSV - MAIN QVD LOAD the second load doesn't AUTOCONCATENATE? Try with the NOCONCATENATE prefix.

Peter_Cammaert
Partner - Champion III
Partner - Champion III

I think you'ld better specify the NOCONCATENATE prefix everywhere. In the end, you should have a table called Table2_CSV (it is never dropped). However it doesn't exist.

BTW you're reading the source QVD twice. I think it would be more efficient if you keep it in memory and add the incremental part before overwriting the QVD.