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

Only load fields that do not yet exist in the data model

I have a problem where i have the following script:

 

for each vFile in FileList('PATH\TO\FOLDER\*.csv')

LOAD
*
FROM
$(vFile)
(txt, utf8, embedded labels, delimiter is ',', msq);

next

 

LOAD

            field1

            field2

            .....

            fieldn

from ['PATH\TO\FILE.csv']

(txt, utf8, embedded labels, delimiter is ',', msq);

 

The files loaded from a folder contains the field KEY and some other dimension, while the file that is loaded in by itself also contains the field KEY, with many other dimensions. The problem is that each field in the tables loaded from the folders are also in the table loaded in separately (This is because there is extra cleaning and transformation done to them in another process).

 

Is there a way for me to only load the fields where they don't yet exist in the app, but keep the "KEY field"? (i.e: if one of the tables loaded from the folder contains the field "email", it should not load the field "email" from the file that isn't loaded in by the loop).   

 

I hope i have made the explanation clear enough.

 

Thank you

 

Labels (3)
0 Replies