Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
What is the difference between Synthetic Keys and Concatenation? Please explain I am new to QlikView
Automatic Concatenation
If the field names and the number of fields of two or more loaded tables are exactly the same, QlikView will automatically concatenate the content of the different statements into one table.
Synthetic keys
Synthetic keys occur when two or more tables have two or more fields in common.
Note: Edited by Community Moderator for clarity
Automatic Concatenation Happens if there is atleast one Field name common between the tables, auto concatenation happens and a key is formed on this Common Field.
Run this and check the data model (Ctrl+T):
LOAD * INLINE [
Country, ID
USA, 1
UK, 2
];
Load * INLINE [
Country, Value
USA, 100
UK, 50
];
Synthetic Key is formed when two or more field names are common between the tables, synthetic keys are formed creating a third table called Syn table with multiple links.
Run this and check the data model:
LOAD * INLINE [
Country, ID
USA, 1
UK, 2
];
Load * INLINE [
Country, ID,Value
USA, 1,100
UK, 2, 50
USA, 1, 200
];
Your description of Auto Concatenation is not right. Auto concatenation happens when two tables have the same exact number of fields and all of them are named the same.
Table1:
LOAD * INLINE [
Country, ID
USA, 1
UK, 2
];
Table2:
Load * INLINE [
Country, ID
IND, 1000
CHN, 5000
];
After reloading there will only be just one table (Table1) because the two tables auto-concatenates because both the field names are the same between the two tables
OOps, you are right.
I should take off that Automatic and just say concatenation happens between two tables when atleast one field is Common in both the tables.
Do you mean association?
Thats the right word. Thanks Marco.