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: 
arusanah
Creator II
Creator II

Synthetic key Resolution

Hi ,

I Have two Tables Table A & Table B . Table A fetches data from .xlsx and Table from SAP. I have to create link between two .  I tried creating link table by fectching data from both tables as shown in link table.

By doing so I  get syn key in my data model (%KEY_PAYER & Payer.Country) . I need to resolve that. But not able to find any solution.

Pls help !!!

Table ALink TableTable B

Payer Row()

Country

Country Code

MatchField

Tab:

Load:

wildMatch(payer.Name,matchfield,$vMap as PayerRow() ,

%KEY_PAYER,

  1. Payer.Country

Resident TableB;

Inner join(tab)

Load

Payer Row()

Country Code as Payer.Country

Resident Table A;

%KEY_PAYER

  1. Country
  2. Payer.CountryCode
  3. Payer.Name
2 Replies
Anonymous
Not applicable

Try (customize) below code in place of your link table code

Tab:

Load
wildMatch (payer.Name,matchfield,$vMap) as [Payer Row],

%KEY_PAYER

Resident TableB;

Inner join(Tab)

Load

Payer Row() as [Payer Row],

Country Code as [Payer Country]

Resident Table A;

ramoncova06
Specialist III
Specialist III

you can create a composite field by using %KEY_PAYER &'_'& Payer.Country



I modified your script since normally the link tables should be at the end of the script and not before the tables they are reading the data from


TableA:

Payer Row(),

Country,

Country Code

MatchField

from .....

TableB:

%KEY_PAYER,

Country,

Payer.Country,

Payer.Name,

%KEY_PAYER&'_'&Payer.Country as %K_Composite

from ...

Tab:

Load:

wildMatch(payer.Name,matchfield,$vMap as PayerRow() ,

%K_Composite

Payer.Country

Resident TableB;

Inner join(Tab)

Load

Payer Row(),

Country Code as Payer.Country

Resident Table A;

drop field Payer.Country from Tab;