Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

QlikSenseUser1
New 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
MVP
MVP

Re: incremental load error "table not found"

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
8 Replies
Partner
Partner

Re: incremental load error "table not found"

Hi!

Try:
[stored_new]:
NoConcatenate Load
id, ...
MVP
MVP

Re: incremental load error "table not found"

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
Highlighted
surendraj
Valued Contributor

Re: incremental load error "table not found"

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
New Contributor III

Re: incremental load error "table not found"

Thank you for your suggestions!
QlikSenseUser1
New Contributor III

Re: incremental load error "table not found"

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

Re: incremental load error "table not found"

Thanks for your help
QlikSenseUser1
New Contributor III

Re: incremental load error "table not found"

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. Order.PNGwrong 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
New Contributor III

Re: incremental load error "table not found"

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!