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

How to remove synthetic key?

Hi,

I have a below script in qvw. when I am reloading it is forming synthetic key on ID and Com1. How can I remove the synthetic key. can anyone please help me in this.

Paper:
LOAD ID,
     Paper,
     [Paper Name],
     name,
     Com1,
     Com2,
     Com3,
     Com4
FROM
Paper.qvd
(qvd);

SR:
LOAD RowNo  as Row,
     Id       as ID,
     Comad1   as Com1,
     Comad2,
     Comad3,
     Comad4
    
FROM
SR.xlsx
(ooxml, embedded labels, table is SR);

Thanks.

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Try this

Paper:

LOAD ID,

     ID&Com1 as Key, 

     Paper,

     [Paper Name],

     name,

     Com1,

     Com2,

     Com3,

     Com4

FROM

Paper.qvd

(qvd);

SR:

LOAD RowNo  as Row,

     Id,

     Comad1,

     Id&Comad1 as Key,      

     Comad2,

     Comad3,

     Comad4

    

FROM

SR.xlsx

(ooxml, embedded labels, table is SR);

Regards

ASHFAQ

View solution in original post

5 Replies
senpradip007
Specialist III
Specialist III

Just rename one of your column name either of the tables. If you want to make a link with both ID & Com1 then you can make a composite key with ID and Com1.

ashfaq_haseeb
Champion III
Champion III

Try this

Paper:

LOAD ID,

     ID&Com1 as Key, 

     Paper,

     [Paper Name],

     name,

     Com1,

     Com2,

     Com3,

     Com4

FROM

Paper.qvd

(qvd);

SR:

LOAD RowNo  as Row,

     Id,

     Comad1,

     Id&Comad1 as Key,      

     Comad2,

     Comad3,

     Comad4

    

FROM

SR.xlsx

(ooxml, embedded labels, table is SR);

Regards

ASHFAQ

MarcoWedel

Paper:
LOAD ID,
     Paper,
     [Paper Name],
     name,
     Com1,

     AutonumberHash128(ID, Com1) as Key,
     Com2,
     Com3,
     Com4
FROM
Paper.qvd
(qvd);

SR:
LOAD RowNo  as Row,
     Id,
     Comad1,

     AutonumberHash128(Id, Comad1) as Key,
     Comad2,
     Comad3,
     Comad4
    
FROM
SR.xlsx
(ooxml, embedded labels, table is SR);

Anonymous
Not applicable
Author

you Need to define a new key

ID & Com1 as %Key1

Load ID & Com1 as %Key,

ID as ID1,

Com1 as Com1a,

Com2,

..

from Paper.qvd

SR:
Load ID & COm1 as &Key,

ID as ID2,

Comad1,

Comad2,

from SR.xlsx

Not applicable
Author

Thanks.