Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

How to create link table by getting rid of sync table

I have following sample and i am getting synthetic keys. I dont want to rename the fields and get rid of synthetic keys, rather i want to eliminate it by creating link table,

can anyone please help me with this by providing the script. I want the key for region,territory and district.

Screenshot (79).png

1 Solution

Accepted Solutions
Highlighted
Creator II
Creator II

Hi Deepak,

See script below:

Table1:
Load
      Region&’|’&Territory&’|’&District AS zLinkKey,
      Region,
      Territory,
      District,
      Sales,
      Invoice
From …;

Table2:
Load
      Region&’|’&Territory&’|’&District AS zLinkKey,
      Region,
      Territory,
      District,
      Revenue,
      Dealer
From …;

Link:
Load
      zLinkKey,
      Region       AS zRegionKey,
      Territory     AS zTerritoryKey,
      District       AS zDistrictKey,
      ‘Table1’     AS Type
Resident Table1;

Drop Fields Region,Territory, District From Table1;

Link:
Load
      zLinkKey,
      Region      AS zRegionKey,
      Territory    AS zTerritoryKey,
      District      AS zDistrictKey,
      ‘Table2’    AS Type
Resident Table2;

Drop Fields Region,Territory, District From Table2;

View solution in original post

5 Replies
Highlighted
Creator III
Creator III

Highlighted
Creator II
Creator II

Hi Deepak,

See script below:

Table1:
Load
      Region&’|’&Territory&’|’&District AS zLinkKey,
      Region,
      Territory,
      District,
      Sales,
      Invoice
From …;

Table2:
Load
      Region&’|’&Territory&’|’&District AS zLinkKey,
      Region,
      Territory,
      District,
      Revenue,
      Dealer
From …;

Link:
Load
      zLinkKey,
      Region       AS zRegionKey,
      Territory     AS zTerritoryKey,
      District       AS zDistrictKey,
      ‘Table1’     AS Type
Resident Table1;

Drop Fields Region,Territory, District From Table1;

Link:
Load
      zLinkKey,
      Region      AS zRegionKey,
      Territory    AS zTerritoryKey,
      District      AS zDistrictKey,
      ‘Table2’    AS Type
Resident Table2;

Drop Fields Region,Territory, District From Table2;

View solution in original post

Highlighted
Creator
Creator

I tried it, but the problem is tables are from SQL Server!!I'm getting error in Link table! Can u write the sample script and show it. It'll be helpful

Highlighted
Creator II
Creator II

Please show me you script

Highlighted
Creator
Creator

Thanks mate for the  answer!!