Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
chibi
Creator
Creator

Link Table not showing the required data

I created a link table because I have a few fact tables. I needed the data to be connected and avoide synthetic keys and circular references. But now there are no errors to the link table script but I am not able to view the data I need and it appears not to be linked at all. Can someone help guide me please.

 

chibi_0-1638436104667.png

Link_table:
LOAD DISTINCT
[linkKey],
draw_id,
game_code
RESIDENT fact_sales_hourly_agg;

CONCATENATE(Link_table)

LOAD DISTINCT
[linkKey],
draw_id,
game_code
RESIDENT fact_winners;

CONCATENATE(Link_table)

LOAD DISTINCT
[linkKey],
draw_id,
game_code
RESIDENT fact_pl_agg;

CONCATENATE(Link_table)

LOAD DISTINCT
[linkKey],
draw_id
RESIDENT fact_sales_liability;

CONCATENATE(Link_table)

LOAD DISTINCT
[linkKey],
draw_id
RESIDENT fact_draw_numbers;

CONCATENATE(Link_table)

LOAD DISTINCT
[linkKey],
game_code
RESIDENT dim_game;

//drop fields from initial QVD load scripts these data fields are no longer needed
DROP FIELDS
draw_id,
game_code
FROM fact_sales_hourly_agg;

DROP FIELDS
game_code,
draw_id
FROM fact_winners;

DROP FIELDS
draw_id,
game_code
FROM fact_pl_agg;

DROP FIELDS
draw_id
FROM fact_sales_liability;

DROP FIELDS
draw_id
FROM fact_draw_numbers;

DROP FIELDS
game_code
FROM dim_game;

Example of code that I added the link key to in the table: 

LOAD
draw_id&'|'&game_code AS [linkKey], //for linktable
draw_id,
game_code,
FROM [lxxxxxx/fact_sales_hourly_agg.qvd]
(qvd);

1 Solution

Accepted Solutions
chibi
Creator
Creator
Author

Yes you're right. I removed the link table and created the link in SQL instead 

 

View solution in original post

2 Replies
simonaubert
Partner - Specialist II
Partner - Specialist II

Hello @chibi 

I'm not a big fan of link tables when you have several facts.

I prefer to concatenate (like a sql union) the fact in one Table? It's easy to understand, easy to maintain and fast. Have you tried this approach ?

Best regards,

Simon

Bi Consultant (Dataviz & Dataprep) @ Business & Decision
chibi
Creator
Creator
Author

Yes you're right. I removed the link table and created the link in SQL instead