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

Synthetic Keys while using two or more associated columns for different tables

Hi, 

I am getting synthetic keys as i am having 2 or more similar column names in the different tables . But the tables are associated with 2 columns with joins , how to resolve this ?

Thanks 

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Create a key field by concatenating the two fields into a new field.  See

https://qlikviewcookbook.com/resolving-synthetic-keys/

-Rob

 

 

Yashwanth_
Contributor
Contributor
Author

Hi Rwunderlich,

I have requirement that multiple attributes of the table are associated with single attribute of other table , so i renamed by taking duplicate col names and i am unable to create compound or link key  by using alias names.

Can you please suggest me an alternate solution for the above scenario.

Thanks

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

What problem are you having creating compound keys? Can you post your script?

-Rob

Yashwanth_
Contributor
Contributor
Author

Hi,

LOAD


CTRL_ID as %_CTRL_ID
REF_BY_EMP as %_REF_BY_EMP,
REF_ID as %_REF_ID,
REF_TO_EMP as %_REF_TO_EMP

from (some qvd)

LOAD
EMPE_ID as %_EMPE_ID,
EMPE_ID as %_REF_BY_EMP,
EMPE_ID as %_REF_TO_EMP,
EMPE_NM,
EMPE_NO
FROM [*****.qvd] (qvd);

 

from the 1st script ref_by_emp is associated with empe_id in the 2nd script & similarly ref_to _emp also.

Now when i load the data sythetic keys are coming.  Can u help me with this

-Thanks Yashwanth.