Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Syn Key - Missing Data after removal

Hello,

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.

Thanks in advance for your time and help.

Stefan

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

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
Not applicable
Author

Hi Jonathan,

thanks for your reply. We have adjusted our data model so that the Syn Key is no longer necessary.

Regards

Stefan

thomas_wang
Creator
Creator

I think the focus of this problem is on SYN's behavior of null values. I encountered a similar problem that when a null value appears in the SYN table, the behavior of the report is very strange.