Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
I found a strange effect, where I would like to understand the reasons and hope, somebody can enlighten me.
In the load script of my application, I load a number of files by using a Wildcard in the path to the files
Let vPathToQvd = Peek('FOLDER',-1,'TMP_PATH_TO_FOLDER') & '/BNDAT/' & '$(vIdOrder)' & '_BNDAT*.QVD';
TMP_BNDAT:
Load
*
From [$(vPathToQvd)]
(qvd);
Normally this works very well, imports all data into the same table and is very efficient (which is important, because the files are very big). Now I found, that it may happen, that QlikSense creates suddenly a table TMP_BNDAT1 and TMP_BNDAT2 instead of concatenating the data into my table TMP_BNDAT.
Does anybody know, why this might happen (e.g. structure of the table is different and then the system does not concatenate)?
I would like to understand the reason for this behaviour, because this leads to data not being loaded correctly and my application does not get all required data. And it's easier to decide on a work-around, if you understand the reason, why it's happening.
Thank you very much for your help.
Best regards
Dirk
Yes you are right, but not only for files that have wildcard string in their load process.
QlikSense will not concatenate any tables, that have different structure, and the opposite is true, all tables that have the same structure will be concatenated.
I bet there are different column names in different files.
Tomasz
Have you cmpared column nams in TMP_BNDAT1 and TMP_BNDAT2?
Hi Tomasz,
thank you very much for your quick response. If I understand it correctly, QlikSense will not concatenate tables loaded with a wildcard string, if their structure is different?
Can you do me the favor to confirm, if I understood you correctly?
That would be great. Thank you very much for your help.
Best regards,
Dirk
Yes you are right, but not only for files that have wildcard string in their load process.
QlikSense will not concatenate any tables, that have different structure, and the opposite is true, all tables that have the same structure will be concatenated.
Thank you Angel.
I changed the code and force now to concatenate the tables in the way I want the system to do it.
For each vFile in FileList(vPathToQvd)
If IsNull(TableNumber('TMP_BNDAT')) Then
TMP_BNDAT:
NoConcatenate Load
*
From [$(vFile)]
(qvd);
Else
Concatenate (TMP_BNDAT)
Load
*
From [$(vFile)]
(qvd);
End If
Next vFile
By this way I get just one table, in the way I need it. Fields with Null values are not a problem for my application.
Best regards,
Dirk