Linking One dimension to another foreign table with multiple keys in SSAS
- Get link
- X
- Other Apps
During developing Product dimension, I had one challenge about linking between product and category. The challenge was that our ERP product model has multiple categories. It allows to link 10 categories to one product which causes lots of issue during building snowflake type connection.
Reference
- FTDW(Fast Track Data Warehouse Reference Gudie)
- FTDW Sizing Tool
- Getting Currency History
- Updating data using Stored Procedure
- CRUD Stored Procedure Generator toolkit for SSMS(Trial)
- AdventureWorks DW Tutorial
- AdventureWorks Entire Files
What is problem
AdventureWorks model for the product
As you see from the above picture, Product is linked to the subcategory and the subcategory linked to category with only one foreign key. During adding this foreign table to the main dimension table, most time, users will click Key field from foreign key field and move to dimension attribute pane to add it. If you think that you have two categories for one product, you can’t add using this method for the second foreign table because if you look at property windows for an attribute, there is no place which you can modify the link defintion between primary key to forign key.
It seems that the design of dimension and foreign key for the snowflake should be one to one relationship.
Possible Solution
We already completed to build product table, so splitting foreign talbe to multiple tables is really time consuming task due to the create all tables changing ETL process etc (in our case, it was 10 tables)
The approach is to leave current ETL process and implement using View Table. The 10 view tables for the category were created and in DSV window, we created 10 foreign connection to each this tabel. After that, we can create 10 hierachies as you are looking at below.
Conclusion
I am not really expert on SSAS limitation, but it looks like that the Dimension design in SSAS has some restriction. I am not sure this restriction comes from SSAS or Data Warehouse priciple. Maybe using View Table, some of headache such as I had can be resolved easily without any modifying ETL process from SSIS package.
However, implementing Margin using Data Warehouse was really fun and super cool. Next challenge is to build Data Mining on the Margin.
- Get link
- X
- Other Apps
Comments
Post a Comment