Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to avois synthetic table ?

I have 3 tables and my requirement is,

1.Cust_no and Cust_name from A and B table should map

2.Cust_no from B and C table should map

Please assist me

A:
LOAD Cust_no ,
     Cust_name,
     Dept,
     City,
     Phone
FROM
C:\Users\257679\Desktop\Applymap.xlsx
(ooxml, embedded labels, table is Sheet1);

B:
LOAD Cust_no,
     Address,
     region
FROM
C:\Users\257679\Desktop\Applymap.xlsx
(ooxml, embedded labels, table is Sheet2);

C:
LOAD Cust_no,
     Cust_name
  resident A;

7 Replies
pauljohansson
Creator III
Creator III

Hi, 

To avoid Syntethical keys you should make sure that only one field from each of you tables is linked to another table.

But why do you want to split your source into three tables?  Why not just load it as one table?

br Paul

nirav_bhimani
Partner - Specialist
Partner - Specialist

Hi,

As per your post do the following thing .I dont know why you want to do like this.

To Remove Synthetic key always rename the field which you doesnot want as linking with other table.


A:
LOAD Cust_no ,
     Cust_name,
     Dept,
     City,
     Phone
FROM
C:\Users\257679\Desktop\Applymap.xlsx
(ooxml, embedded labels, table is Sheet1);

B:
LOAD Cust_no,

     Cust_no as CustNo1,
     Address,
     region
FROM
C:\Users\257679\Desktop\Applymap.xlsx
(ooxml, embedded labels, table is Sheet2);

C:
LOAD Cust_no as CustNo1,
     Cust_name as  Cust_name1
  resident A;

Regards,

Nirav Bhimani

Not applicable
Author

Hi,

Can you please Attach the Sample Application.

Not applicable
Author

Hi,

Please tell me Why you are creating a new table C

Anonymous
Not applicable
Author

1.Cust_no and Cust_name from A table should map to Cust_no and Cust_name in B table

2.Cust_no from B should map to Cust_no in C table

sivarajs
Specialist II
Specialist II

Using common field as key  in your table can avoid creating synthetic keys

A:

LOAD * ,Cust_no&Cust_name as key Inline [

Cust_no,Cust_name, Dept, City,Phone

123, A ,Sales ,Bang ,0908088

];

B:

LOAD Address,region,Cust_no&null() as key Inline [

Cust_no,Address,region

216,bang,south

];

 

C:

LOAD Cust_no&Cust_name as key;

LOAD Cust_no,

     Cust_name

  resident A;

nirav_bhimani
Partner - Specialist
Partner - Specialist

Hi,

My friend CustName is not there in table B, I still confused why you want resident table C:??????

Kindly expalin in brief so that it would be more clear or else share a demo file for further help.

Regards,

Nirav Bhimani