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

Resolve synthetic key

Hi all,

I have got two tables.

Source and Target.

Source got cust_ID, Semester,Area

Target got cust_ID, Semester, Year, Month,Country

I want these cust_ID and Semester to be linked together.

Here in this case, it forms a synthetic key, if i change the Semester field name with alias name then the relation between tables are broken.

How can i get these two fields to be linked between two tables without forming synthetic key

1 Solution

Accepted Solutions
Kushal_Chawda

Create the Key using Cust_ID & semester

Table1:

LOAD cust_ID as CustID_1,

           Semester as Semester_1,

            autonumber(cust_ID&Semester) as Key

              Area

FROM table1


Table2:

LOAD

autonumber(cust_OD&Semester) as Key

cust_OD,

Semester,

Year,

Month,

Country

FROM table2

View solution in original post

5 Replies
Kushal_Chawda

Create the Key using Cust_ID & semester

Table1:

LOAD cust_ID as CustID_1,

           Semester as Semester_1,

            autonumber(cust_ID&Semester) as Key

              Area

FROM table1


Table2:

LOAD

autonumber(cust_OD&Semester) as Key

cust_OD,

Semester,

Year,

Month,

Country

FROM table2

Chanty4u
MVP
MVP

use concatenated key

load *,

Cust_Id '&_&' Semester  as newId

arasantorule
Creator III
Creator III

Hi,

Can you try the below

Table1:

LOAD cust_ID,

     Semester,

     cust_ID&Semester as Key,

     Area

FROM [...\xyz];

Table2:

LOAD

  cust_OD&Semester as Key,

  Year,

  Month,

  Country

FROM [...\xyz];

Thank You

Anonymous
Not applicable
Author

thanks all for your suggestions and answers, i got the solution

Chanty4u
MVP
MVP

coooooooool