Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
QlikSenseUser1
Contributor III
Contributor III

incremental load error "table not found"

Hi guys,

 

I'm implementing an incremental load script, that appears to be working fine up to the concatenate step. I however receive an
Failure message: 

 

Debug.PNG

 For some reason it does not appear to  find the "store_new" table in I'm using in the last line. 

Please find the code here: 

Code(part1).PNG

 

Cod(part2).PNG


Where am I going wrong?  Thanks for your help! 




1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Both the [stored new] and the concatenate are being auto concatenated to table1 because they have the same fields as table1. Prevent the auto concatenate using NoConcatenate: 

stored_new:
NoConcatenate 
Load ...

Concatenate (stored_new)
Load ...

Explicitly stating the target of the Concatenate is good practice and may have helped you find the problem quicker.

Posting your code as text rather than as an image makes responding a little easier.

 

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

8 Replies
Zhandos_Shotan
Partner - Creator II
Partner - Creator II

Hi!

Try:
[stored_new]:
NoConcatenate Load
id, ...
jonathandienst
Partner - Champion III
Partner - Champion III

Both the [stored new] and the concatenate are being auto concatenated to table1 because they have the same fields as table1. Prevent the auto concatenate using NoConcatenate: 

stored_new:
NoConcatenate 
Load ...

Concatenate (stored_new)
Load ...

Explicitly stating the target of the Concatenate is good practice and may have helped you find the problem quicker.

Posting your code as text rather than as an image makes responding a little easier.

 

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
surendraj
Specialist
Specialist

After your  step 2 (creation of QVD)

drop your table 1.

I guess that should be enough in your case.

if you won't drop the table1,the table which you have  below are auto concatenate to table1.

so finally,your full table data available in table1 and you are trying to create qvd with stoted_new table. 

Thats why it throwing the error as table not found.

 

QlikSenseUser1
Contributor III
Contributor III
Author

Thank you for your suggestions!
QlikSenseUser1
Contributor III
Contributor III
Author

Thank you for your explanation, I was not aware that Qlik auto concatenates tables!
QlikSenseUser1
Contributor III
Contributor III
Author

Thanks for your help
QlikSenseUser1
Contributor III
Contributor III
Author

Thanks 

The code works fine now, but I just realized that the tables are joined such that the new "incrementally loaded data" (ie. the newest data) is placed at the top of the QVD file and the old data follows below. 

IE: if I head a timseries expressed as integers my table would start with 16, 17.....to 25 and AFTER THAT start from 1, 2, ..to 15. wrong order in QVD filewrong order in QVD file

 
Is there a way so that it saves it in the right order in the qvd? 
Please find below the otherwise working code: 

// References:
//
// "Macro lib reference:
// LET vFolderPath = 'lib://FilePath/'

 

// 1 .File load
table1:
LOAD id,
date,
[firsr name],
[second name]
FROM
'lib://Incremental Load/incr1.xlsx'
(ooxml, embedded labels, table is Sheet1);

//2. Create a qvd file.
store table1 into 'lib://QVD/Test.qvd';
drop table table1;

//3. Find current maximum date
max_date:
LOAD
max(date) as Maxdate
FROM 'lib://QVD/Test.qvd'(qvd);

//4. Store the Maximum date in a variable.
Let Maxdate = floor(peek('Maxdate'));

//5.Pull new rows from `incr2.xlsx`.
stored_new:
NoConcatenate
LOAD id,
date,
[firsr name],
[second name]
FROM
[lib://Incremental Load/incr2.xlsx]
(ooxml, embedded labels, table is Sheet1)
where date> $(Maxdate);
STORE stored_new into [lib://QVD/Test.qvd] (qvd);

//6 Concatenate.
Concatenate (stored_new)
LOAD id,
date,
[firsr name],
[second name]
FROM [lib://QVD/Test.qvd] (qvd);
STORE stored_new into [lib://QVD/Test.qvd] (qvd);

 

 

Thanks in advance

QlikSenseUser1
Contributor III
Contributor III
Author

apologies, there was a mistake in the code I previously posted. Please see here: 

 

// 1 .File load
table1:
LOAD id,
date,
[firsr name],
[second name]
FROM
'lib://Incremental Load/incr1.xlsx'
(ooxml, embedded labels, table is Sheet1);

//2. Create a qvd file.
store table1 into 'lib://QVD/Test.qvd';
drop table table1;

//3. Find current maximum date
max_date:
LOAD
max(date) as Maxdate
FROM 'lib://QVD/Test.qvd'(qvd);

//4. Store the Maximum date in a variable.
Let Maxdate = floor(peek('Maxdate'));

//5.Pull new rows from `incr2.xlsx`.
stored_new:
NoConcatenate
LOAD id,
date,
[firsr name],
[second name]
FROM
[lib://Incremental Load/incr2.xlsx]
(ooxml, embedded labels, table is Sheet1)
where date> $(Maxdate);
//STORE stored_new into [lib://QVD/Testdelta.qvd] (qvd);

//6 Concatenate.
Concatenate (stored_new)
LOAD id,
date,
[firsr name],
[second name]
FROM [lib://QVD/Test.qvd] (qvd);
STORE stored_new into [lib://QVD/Test.qvd] (qvd);

 

Thanks!