Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
March 26 at 10am ET: See how Qlik drives growth and value in ISV segment - REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
PaulinaWanago
Contributor III
Contributor III

Reload not found the table

Hi, 

I'm facing the issue with below script reload:

 

LET vs_ETL_Rows = 2;

R:
LOAD * INLINE [
Col1, Col2
A, 1
B, 2
];


for vVar=1 to 2

sections:
NoConcatenate
LOAD * resident R
where [Col1] = $(vVar);

Next
For vVar = 1 to ($(vs_ETL_Rows)-1)
Join(sections)
Load * Resident "sections-$(vVar)";
NExt

 

Reload return the error:

ScriptErrorCount 1
ScriptErrorDetails Table 'sections-1' not found
ScriptErrorList Table Not Found
ScriptError Table Not Found

 

Could you please help me to fix this issue.

Labels (3)
6 Replies
sbaro_bd
Creator III
Creator III

Hi @PaulinaWanago ,

_______________________________________________________

LET vs_ETL_Rows = 2;

R:
LOAD * INLINE [
Col1, Col2
A, 1
B, 2
];


for vVar=1 to 2

sections:
NoConcatenate
LOAD * resident R
where [Col1] = $(vVar);

NEXT

EXIT SCRIPT // load only the first part of script

For vVar = 1 to ($(vs_ETL_Rows)-1)
Join(sections)
Load * Resident "sections-$(vVar)";
NExt

_____________________________________________________________

When you only load the first part, you can see the table sections-1 doesn't exist (take a look on you model).

I don't know what you want to do exactly, so i can really suggest adjustments.

Regards.

marcus_sommer

It's no problem to include the loop-iterator or an appropriate referenced value into a load-logic but you need to include the iterator-information nearly everywhere - by defining the table, the source, any kind of where-clause as well as the store/drop-stamentes, like:

...

for vVar=1 to 2
   [sections-S(vVar)]:
   NoConcatenate LOAD * resident R where [Col1] = $(vVar);
...

Beside this be aware that using join-operations within loops could become tricky - if for example the added fields from the first iteration becomes key-fields in the following ones ...

PaulinaWanago
Contributor III
Contributor III
Author

Hi Marcus, 

It make sense but with  [sections-S(vVar)]: also script reply error - 'Table 'sections' not found.

PaulinaWanago
Contributor III
Contributor III
Author

Thanks Sbaro, looks like it works. Will try in big script.

PaulinaWanago
Contributor III
Contributor III
Author

But EXIT SCRIPT finish the reloads, what if script should run and execute next part of the script?

marcus_sommer

You need to apply it everywhere - any you may have missed anyone, maybe within the join-reference.

Looking within the document-log will show the exact place of which iteration where the error happens. A shortcut in the above example may be just to search per CTRL + F for the term sections.