Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have an application QlikSense where i am using the Generic load prefix, the data is coming from an API so i use REST connector. The data is loaded correctly in Dev environment without any error.
When its moved to Production environment, i got the error "Field not found". In the log it seems like the For Loop of the TableList (please see the code below) doesn't work. so it returns field not found because after this part of the loop i'm trying to use one column from the RESULT_TABLE that it is supposed to be loaded
Any one have any idea ? please
Below the script used :
[TMP]:
GENERIC LOAD Distinct Code, Month,Amount RESIDENT [FACTTABLE];
[RESULT_TABLE]:
LOAD DISTINCT Code, Month RESIDENT [FACTTABLE];
FOR i = 0 to NoOfTables()
TableList:
LOAD TableName($(i)) AS Tablename AUTOGENERATE 1
WHERE WildMatch(TableName($(i)), 'TMP.*');
NEXT i
FOR i = 1 to FieldValueCount('Tablename')
LET vTable = FieldValue('Tablename', $(i));
LEFT JOIN ([RESULT_TABLE]) LOAD Distinct * RESIDENT $(vTable);
DROP TABLE $(vTable);
NEXT i
DROP Table TableList;
Thanks in advance
Could you maybe provide a screenshot of your datamodel?
Furthermore, I see you name the first table 'TMP', but the wildmatch contains 'TMP.'. Not sure if this is needed, or whether this is a typo.