What is the logic will you implement to load the data in to one fact from 'n' number of dimension tables.

Questions by phanimv   answers by phanimv

Showing Answers 1 - 21 of 21 Answers

Gopalakrishnan Kannan

  • Dec 21st, 2006
 

First I will select the dim tables which has more records. I will join those tables and use it as the source. Dim tables contains less rows will be used in lookup.

I will try to join the maximum possible tables in the source qualifier itself ( using sql overrite if requried).

  Was this answer useful?  Yes

Load data into the dim tables and generate a surrogate key of each of the dimesnions. Now to load the fact table , look up each of the dim tables, find out the suffogate key ( which will be the FK for the fact table ) and popullate the fact.

For eg

Dim CUSTOMER

PK      CUST_NAME     CUST_ADDD

1        DAVID             London

2        DAINA             Belfast

Dim PRODUCT

PK     PROD_NAME     PROD_UNIT

1      TOOTHBRUSH    no

2      FRUIT                KG

FACT SALES

CUstkey   PRodKey Qty_Purchased SalesAmt

1                  1          5                      20

1                  2           2                      5

This simply means that DAVID purchsed Toothbrush and Fruits in the 'measured' amounts.

Guest

  • Jan 22nd, 2007
 

You should always load Dimension table first then followed by Fact.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions