hi everybody,
I have got a question according to the datatype hierarchyid to be "re-used" in SSAS.
I created a Table with hierarchical data in it and use the datatype hierarchyid to display several hierarchy-level (aggregations on different levels,...).
It seemed to be the better solution than design tables with relationsships, in particular the hierarchy is not regularly filled - e.g. one branch has 3 levels, another 7 levels, etc. It works pretty fine on the relational database (Queries, Reports,...).
Above all, i do not need to create many joins and I do not have these awful 1:1 links to reach the "imaginary" lowest level (basic table)
Now I want to use that table to generate a dimension in SSAS for a cube.
Basically the systematology of the hierarchyid datatype is similar to the methodology of SSAS - Is it possible to use such a table 1to1 for dimensional data without rebuilding a relational parent-child-construction?
The table looks like (content is contribution margin calculation with several positions and levels):
[LKP_Value_Type](
[Value_Type_Id] [int] IDENTITY(1,1) NOT NULL, --primar key
[Value_Type] [nvarchar](200) NULL, --name
[PID] [int] NULL, --parentID, if exist
[HID] [hierarchyid] NOT NULL, -- generated hierarchyID
[HLevel] AS ([HID].[GetLevel]()) PERSISTED, -- hierarchy level (lowest level varies from 2 to 9)
[RF_DB] [int] NULL --ordering of the value types for "readable" representation
)
How can I integrate that table easily as dimensional data in SSAS? Is it possible at all?
Thanks for help