Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
asb02512
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
shraddha_g
Partner - Master III
Partner - Master III

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
shraddha_g
Partner - Master III
Partner - Master III

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.

shaktisinghchau
Contributor III
Contributor III

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

jonathandienst
Partner - Champion III
Partner - Champion III

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

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.

Not applicable

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

asb02512
Contributor III
Contributor III
Author

thanks a lot shraddha

asb02512
Contributor III
Contributor III
Author

Thanks everyone. Issue resolved By Creating Composite Keys