Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear Qlik Community,
I have three folders containing 30-40 .csv files.
The structure of the .csv files WITHIN EACH FOLDER is identical.
When two files from DIFFERENT FOLDERS are compared, 2-5 columns are named differently and it is possible that the total number of columns differs slightly also.
6-7 columns are definitely the same.
After adapting the script taken from
http://qlikviewmaven.blogspot.com/2008/09/loading-all-of-files-from-folder.html
I was able to quickly load all files from each folder into QlikView:
**************************************Script******************************************************
Directory C:\Users\eh7ja1a\Qlik\AM Upgrade\1_Resources\MQB China\MQB China_Modulexporte;
For each csvFile in filelist ('*.csv')
MQB_China:
Load
*
From $(csvFile)
(txt, codepage is 1252, embedded labels, delimiter is ';', msq, header is 1 lines);
Next csvFile;
**************************************************************************************************
When loading all files from one folder, the result is one automatically concatenated table called "MQB_China" containing data from all the 30-40 .csv files - exactly what I wanted.
When I load the contents of the second folder, I end up with a second table.
Since there are several columns with identical column-name shared between the two resulting tables (see screenshot).
As you may guess, I want to get rid of the excessive associations between the identical columns in each table, leaving only one primary key, which connects the two tables.
When I QUALIFY *;
the tables get broken up into the number of tables as there are files in each folder (see 2nd example).
And here comes my QUESTION:
How can I qualify the two "original" (automatically concatenated) tables MQB_China and MQB41B, so that I end up with two (not 60) separate tables without any associations?
I'm sure its quite simple by I am a beginner and can't seem to find the solution.
Any tips are greatly appreciated!
Thanks in advance,
Peter