Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

How many ways to avoid the synthetic keys ?

How many ways to avoid the synthetic keys ?

5 Replies
Not applicable

Re: How many ways to avoid the synthetic keys ?

Countless! Depends on the problem, but there's no only one, two or three ways.

MVP
MVP

Re: How many ways to avoid the synthetic keys ?

Hi Naveen,

the most common ways IMHO are:

- building compound key fields (concat the values with a delimiter: field1 & '_' & field2)

- use link tables with distinct occurances of the field combination and use autonumber as surrogate key

- join the two tables to one resulting table

- Ralf

Employee
Employee

Re: How many ways to avoid the synthetic keys ?

Ralf Becher covered 99% of the situation

Re: How many ways to avoid the synthetic keys ?

HI

With addition of Ralf Becher ,

You can also  rename the fieldname to avoid synthetic key

v_iyyappan
Valued Contributor

Re: How many ways to avoid the synthetic keys ?

Hi,

To remove the Synthetic Key to use following method,

1. When any two tables share more than one common field, QlikView creates a complex key, or synthetic key, to try and associate both tables through the combination of all of the common fields between them.

2. This takes the form of an additional table containing the shared fields and an additional key field added to all involved tables.

3. Suppose tables all filednames same means use the concatenate function to remove the Synthetic Key

Regards,

Community Browser