Dimension with hierarchical data - how to handle parent with no children
3 posters
Page 1 of 1
Dimension with hierarchical data - how to handle parent with no children
If I have a product dimension with attributes including brand_name and product_name which is populated from the brand and product tables in the source system, when I get a new brand in the brand table but it has no products should I 1) add a row to the product dimension with the new brand_name and set product_name to "unknown" , 2) do not add a row to the product dimension but add a row to a subset conformed dimension for brand (which is a subset of columns from the product dimension), or 3) do something different. To me, putting a record in the product dimension, whose grain is a product, without a real product seems wrong. What do you think?
MedicaidGirl- Posts : 2
Join date : 2014-05-01
Re: Dimension with hierarchical data - how to handle parent with no children
I'd do the following:
1. Create a record in your subset Brand Dim regardless
2. Only create a record in your Product Dim if you need to reference it now in a fact table. You'd have to use dummy values for the Product attributes and then update the Dim record once you have the actual Product record
Otherwise don't create the Product Dim record until you have the details of the Product record
1. Create a record in your subset Brand Dim regardless
2. Only create a record in your Product Dim if you need to reference it now in a fact table. You'd have to use dummy values for the Product attributes and then update the Dim record once you have the actual Product record
Otherwise don't create the Product Dim record until you have the details of the Product record
nick_white- Posts : 364
Join date : 2014-01-06
Location : London
Re: Dimension with hierarchical data - how to handle parent with no children
There is nothing you need to do that is special in this case. Just create brand and product dimension rows as needed.
From a hierarchy standpoint, it does not matter their are brands without products. A product references a brand. As products are introduced they would reference the appropriate brand and the hierarchy builds itself out.
From a query standpoint, if you want orphan brands to show up, use an outer join.
From a hierarchy standpoint, it does not matter their are brands without products. A product references a brand. As products are introduced they would reference the appropriate brand and the hierarchy builds itself out.
From a query standpoint, if you want orphan brands to show up, use an outer join.
Similar topics
» hierarchical or parent child dimension?
» Dimensional Model from a Hierarchical Data Source
» Problems with design to allow Rolling up of Hierarchical Data
» Data Architecture Question - Different counts at depending on the hierarchical level being viewed
» Track hierarchical slowly changing data which allows relational multiple future dates and retro terms
» Dimensional Model from a Hierarchical Data Source
» Problems with design to allow Rolling up of Hierarchical Data
» Data Architecture Question - Different counts at depending on the hierarchical level being viewed
» Track hierarchical slowly changing data which allows relational multiple future dates and retro terms
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|