Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dirk_fischer
Creator
Creator

Loading files with wildcard leads to non-concatenated tables?

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

1 Solution

Accepted Solutions
tomovangel
Partner - Specialist
Partner - Specialist

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.

View solution in original post

5 Replies
tomasz_tru
Specialist
Specialist

I bet there are different column names in different files.

Tomasz

tomasz_tru
Specialist
Specialist

Have you cmpared column nams in TMP_BNDAT1 and TMP_BNDAT2?

dirk_fischer
Creator
Creator
Author

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

tomovangel
Partner - Specialist
Partner - Specialist

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.

dirk_fischer
Creator
Creator
Author

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