Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

What is synthetic Key in Qlikview...?

Please gives us on pratical Example

9 Replies
matthewjbryant
Creator II
Creator II

It's the way Qlikview joins 2 tables with more than one columns named the same. Qlikview creates a temporary table and calls this a 'Synthetic Key'.

struniger
Creator
Creator

Not applicable
Author

Hi Matthew,

           I am the new user of Qlikview so can you please give me one simeple example for the same..

regards,

Yogesh

VishalWaghole
Specialist II
Specialist II

Hi Yogesh,

  1. A synthetic key is in my experience often a sign of a poorly designed data model. I say that, given the number of times I have found a synthetic key in the table viewer only to realize that I made a mistake in the script. If you get a synthetic key and didn’t expect it, I can only say: Back to the drawing board! You should most likely change your data model.
  2. QlikView creates an additional table (the $Syn table) that in many cases is superfluous: An additional table is the best solution if none of the data tables by itself completely spans the set of composite keys. But in real life, there is usually one table that contains all relevant combinations of the keys, and then this table can be used to store the clear text of the individual keys.
  3. For clarity, I like to create my own concatenated keys. It forces me to think and create a data model that I believe in. Removing the synthetic keys becomes a method to ensure a good data model, rather than a goal in itself.

also please go through with this blog.

community.qlik.com/blogs/qlikviewdesignblog/2013/04/16/synthetic-keys

-- Regards,

Vishal Waghole

Not applicable
Author

Hi Yogesh,

I suggest having a read of this thread

http://community.qlik.com/blogs/qlikviewdesignblog/2013/04/16/synthetic-keys

hope that helps

Joe

amit_saini
Master III
Master III

VishalWaghole
Specialist II
Specialist II

Hi Yogesh,

Check this link,

www.learnallbi.com/qlikview-resolving-synthetic-keys/

good example to understand what is synthetic key and how to avoid it.

Hope you understand from this.

-- Regards,

Vishal Waghole

matthewjbryant
Creator II
Creator II

Are you used to dealing with data in SQL or similar? Normally you join columns explicitly, but Qlikview will join any columns with the same names so you have to be careful when naming your columns. You can avoid them by being more explicit in your LOAD (using JOINs) or creating new tables that link to others via one named column.

Not applicable
Author

when we have more than one field common between 2 tables then we will get synthetic key.

ways to remove:

comment,

rename,

qualify,unqualify statements