I have a question regarding the Syn Key. I know that it is created automatically when multiple fileds in different tables match. Now this is unfortunately the case in my QLikview app. Following Syn Key was created automatically.
Now according to my colleague automatically created Syn Keys have to be avoided, so I tried to replace the automatically created SynKey with a Manual one which Looks like this:
After doing this I noticed that some data is missing. I think the reason is that some PVKey´s can be (Null)
Do you have any idea how I can recreate the automatic Syn Key without loosing some of the data ?
If you Need more Information just Ask, I am happy to provide it.
First of all - syn keys are not inherently bad. Why write code to just mimic what Qlik already does for you?
The question is rather do you need to associate the tables based on both the Asset key and the PVKey, and do either or both tables contain all possible values for one or both of those key fields.
If the conclusion is that you must link them using a link table (both are required and each associated table contains onlya subset of possible values for both of the fields, then leave the syn key in place. Otherwise you can remove the composite key, or build a composite using a concatenation of the keys* and do not load the fields themselves in the 'other' table.
*Also AutoNumber() if your data model is large and there are many distinct values of the composite key.
Logic will get you from a to b. Imagination will take you everywhere. - A Einstein