Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have seen some projects in which a link table is created without composite keys. It's not clear to me why.
In the example of the script below, each fact table is connected to the link table by InvoiceID and OrderID.
KeyTable:
LOAD InvoiceID,
Agent,
Customer,
Product
Resident Invoices;
Concatenate (KeyTable)
LOAD OrderID,
Agent,
Customer,
Product
Resident Orders;
I wonder what is the impact on performance, and whether I should change it and add composite keys, or whether there are situations where composite keys are not necessary.
Thanks in advance!
Hi Marcus,
I just realized that I referred to one table (invoices), but there are actually 2 separate tables: Invoices and orders.
I'm not sure I understand what is your recommendation in such a case when both are sharing the 3 dimensions.
Thanks!
The suggestion ist to concatenate both tables into one fact-table and adding there all missing or relevant information, for example the order-id to the records from the invoices and also an extra field Source to be able to select or reference later to a certain area of the dataset.
- Marcus
Thanks! 🙂