Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there!
Can someone tell me why i get different number of synthetic keys when i load my script like this:
1. Version:
Here i get 6 syn keys
Inventory_Storage:
LOAD ExpNr,
area,
"buffer",
"TimeStamp" as Zeitpunkt,
"current",
"min",...
JOIN LOAD ExpNr,
area,
"buffer",
"time" as Zeitpunkt,
"min", ...
StatAverage:
LOAD ExpNr,
area,
"buffer",
"time" as Zeitpunkt,
"min",...
JOIN (StatAverage) LOAD ExpNr,
area,
"buffer",
"TimeStamp" as Zeitpunkt,
"current",
"min",...
2. Version:
Here i get 3 Syn Keys
StatAverage:
LOAD ExpNr,
area,
"buffer",
"time" as Zeitpunkt,
"min",...
JOIN (StatAverage) LOAD ExpNr,
area,
"buffer",
"TimeStamp" as Zeitpunkt,
"current",
"min",...
Inventory_Storage:
LOAD ExpNr,
area,
"buffer",
"TimeStamp" as Zeitpunkt,
"current",
"min",...
JOIN LOAD ExpNr,
area,
"buffer",
"time" as Zeitpunkt,
"min", ...
Regards
Chris
EDIT: I removed the SELECT parts and the rest of the Syn-key columns (everything after the ... is identical on all tables)
Multiple fields are getting repeated in your tables like Area, Buffer, Zeitpunkt etc
You can Rename, Comment, Delete, Composite key of these to avoid...
see these:
What is synthetic keys? How it can be avoided?
Yes i know that, and that wasn't my Question...
My Question was why i get 6 Synthetic Keys when trying the first Version and i get only 3 keys when i load my data with the second Version of the Script.
Regards
Chris
may be becoz of the sequence of the tables..
Try with same sequence as it is in version1
Yes but why is the sequence a decisive factor when loading the script?
Regards
Chris
Not sure, but I would say, mention table name when you are joining..
like
Inventory_Storage:
LOAD ExpNr,
area,
"buffer",
"TimeStamp" as Zeitpunkt,
"current",
"min",...
JOIN LOAD ExpNr, //here and same in version 1 when you join
area,
"buffer",
"time" as Zeitpunkt,
"min", ...
If I am not wrong, you will get same synthetic keys in both the version
I'll try this for now.
Coming back when finished.
Regards
Chris
Hi Christoph,
As i think,Order doesn't matter for synthetic keys. order would not effect the model. So could you please share the application with taking no data (take only column as inline). So that we can investigate in better way.
Regards,
Raghvendra
Just all in all i'm looking for a deeper sense behind this all.
I would like to know why Qlik Sense (and maybe QV) is making different number of synthetic keys while loading the same data with 2 load nearly similar loading scripts (at least the code is the same, just the positioning is different). What is QS trying to do, to think that there should be a differing number of syn keys, so in the long term i may be able to more deeply understand why i should or shouldn't build my script like i do or did.
Thanks for your answers so far. But i'm currently not looking for removing these keys nor making my script better in loading time or something like that . This all was just a curiosity i noticed and hoped i can get some answers to.
Regards
Chris
I added an example .qvf with marks, which part you need to swap.
In this example qvf you'll get either 1 syn key or 3.
Regards
Chris