Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

How to Remove the Synthetic Keys

Dear all.

Please help me and guide me regarding the synthetic key issue. i am a newbie. Please find the attached image, I am getting the desired result but the issue is of synthetic keys. I dont know where i am doing the mistake renaming or qualify and unqualify. How to remove the synthetic keys in the current scenario.

1 Solution

Accepted Solutions
Highlighted
Partner
Partner

Re: How to Remove the Synthetic Keys

Create a composite key of BRANCH_CD and CUST_SALESMAN to link Table Branches and Customer to Monthly_Sales_Activity. 2nd Key will be VNDR# and ITEM# to link Table Vendor and ITEM Master to Monthly Sales Activity.

View solution in original post

7 Replies
Highlighted
Partner
Partner

Re: How to Remove the Synthetic Keys

Create a composite key of BRANCH_CD and CUST_SALESMAN to link Table Branches and Customer to Monthly_Sales_Activity. 2nd Key will be VNDR# and ITEM# to link Table Vendor and ITEM Master to Monthly Sales Activity.

View solution in original post

Highlighted
Contributor III
Contributor III

Re: How to Remove the Synthetic Keys

To minimize or remove synthetic key you can concatenate the fields which is causing synthetic key like I did below.

BRANCH_CD & '|'& CUST_SALESMAN AS Key

Highlighted
MVP
MVP

Re: How to Remove the Synthetic Keys

Firstly - synthetic keys are not an evil that needs to be eradicated, they are a valid and efficient way to handle composite keys (association keys made up of more than one field).

In your case, you would need to decide if the association between customer and monthly sales activity should be a salesman level or at a  salesman and branch level. If the former, then you simply could not load the branch code into the customer table. If its the latter, you could create your own handling of the composite key, or you could leave the synthetic key in place.

The same analysis should be performed on the other synthetic key.

Building in your own handling of the composite key is unlikely to perform better in reload or in the front end.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Highlighted
Creator II
Creator II

Re: How to Remove the Synthetic Keys

Hi,

in

monthly sales activity table and

items master table you have filed like itmes#,

if you have same underlined data in that filed in both the tables,

create a..composite key with vndr# and items#,

or if you don't have same underlined data in items# in both the tables rename that in one table.

and

to avoid second synthetic key,

create composite key with branch_cd and cus_salesmen.

Highlighted
Not applicable

Re: How to Remove the Synthetic Keys

Simple task

Rename the fields as different which are not useful to link and make the fields same in the tables which are need to be link

Highlighted
Contributor III
Contributor III

Re: How to Remove the Synthetic Keys

thanks a lot shraddha

Highlighted
Contributor III
Contributor III

Re: How to Remove the Synthetic Keys

Thanks everyone. Issue resolved By Creating Composite Keys