First we have to load the data into dimension table then after we load the data into fact table
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).
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.
What is the logic will you implement to load the data in to one fact from 'n' number of dimension tables.
Profile Answers by phanimv Questions by phanimv
Questions by phanimv answers by phanimv