Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Prasun7
Contributor II
Contributor II

Why is Synthetic Key forming when loading Multiple CSVs with exact same fields?

Table1:
LOAD * INLINE [
Name,Email1
Person2,sdfdf
Person3,gff
];
LEFT KEEP(Table1)
BaseTable:
Load
Name,Marks
From [lib://Path/A*.csv]
(txt, utf8,embedded labels, delimiter is ',', msq);
Exit script;

//The data source path has 3 CSVs A1.csv, A2.csv & A3.csv. Why are these CSVs forming synthetic key instead of Concatenating?

Prasun7_0-1645243965750.png

 

Labels (4)
1 Solution

Accepted Solutions
marcus_sommer

The auto-concatenation feature worked only for "normal" load-statements like expected. The combination of a load with additionally statements like your left keep changed the behaviour because it's a join-statement (that the join-table remained afterwards isn't important for the technically implementation else it's a special kind of on-top-feature).

Essentially is the order of execution of the various and multiple parts. In This case your wildcard-loop over all A*Files isn't applied at first and creating a concatenated table else the first file is loaded and joined against the target-table and after that the second file is taken and joined and so on.

I don't know how all this is exactly technically implemented but within the most cases you will need to pre-load your (n sub-) tables/files into an existing single-table if you want to use them for join- and mapping-operations. It might look like more efforts as needed but I deduce from this behaviour that Qlik doesn't use temporary table buffer-layer else  the write/evaluate the data immediately against the system-tables.

- Marcus 

View solution in original post

3 Replies
rubenmarin

Hi, it's because it's creating a differnt table for each file, try with exists instead of left keep:

Table1:
LOAD * INLINE [
Name,Email1
Person2,sdfdf
Person3,gff
];

BaseTable:
Load
Name,Marks
From [lib://Path/A*.csv]
(txt, utf8,embedded labels, delimiter is ',', msq) Where Exists(Name);
Exit script;

Prasun7
Contributor II
Contributor II
Author

Yes, but why is it creating different tables for each file? According to the Qlik documentation, it should auto Concatenate the tables with same name and number of fields.

marcus_sommer

The auto-concatenation feature worked only for "normal" load-statements like expected. The combination of a load with additionally statements like your left keep changed the behaviour because it's a join-statement (that the join-table remained afterwards isn't important for the technically implementation else it's a special kind of on-top-feature).

Essentially is the order of execution of the various and multiple parts. In This case your wildcard-loop over all A*Files isn't applied at first and creating a concatenated table else the first file is loaded and joined against the target-table and after that the second file is taken and joined and so on.

I don't know how all this is exactly technically implemented but within the most cases you will need to pre-load your (n sub-) tables/files into an existing single-table if you want to use them for join- and mapping-operations. It might look like more efforts as needed but I deduce from this behaviour that Qlik doesn't use temporary table buffer-layer else  the write/evaluate the data immediately against the system-tables.

- Marcus