Creating a Dimension



This is a sample dimension with attributes, hierarchies, and relationships.

published 09.07.12

last updated 09.09.12



<Biml xmlns="">
        <Connection Name="ProdConnection" ConnectionString="Provider=SQLNCLI10.1;Data Source=Localhost;Persist Security Info=False;Integrated Security=SSPI;Initial Catalog=Products" />
        <Database Name="ProdDB" ConnectionName="ProdConnection" />
        <Schema Name="ProdSchema" DatabaseName="ProdDB" />
        <Dimension Name="DimProduct" SchemaName="ProdDB.ProdSchema">
                <Column Name="ProductID" />
                <Column Name="ProductName" DataType="String" Length="50" />
                <Column Name="CategoryName" DataType="String" Length="50" />
                <Column Name="SubcategoryName" DataType="String" Length="50" />
                <Attribute Usage="Key" Name="ProductName">
                        <KeyColumn ColumnName="ProductID" />
                    <NameColumn ColumnName="ProductName" />
                <Attribute Name="Category Name">
                        <KeyColumn ColumnName="CategoryName" />
                <Attribute Name="Subcategory Name">
                        <KeyColumn ColumnName="SubcategoryName" />
                <Relationship Name="Category Name" ParentAttributeName="Subcategory Name" ChildAttributeName="Category Name" />
                <Relationship Name="Subcategory Name" ParentAttributeName="ProductName" ChildAttributeName="Subcategory Name" />
                <Hierarchy Name="Categories">
                        <Level Name="Category Name" AttributeName="Category Name" />
                        <Level Name="Subcategory Name" AttributeName="Subcategory Name" />
                        <Level Name="ProductName" AttributeName="ProductName" />

A key thing to notice in this Biml snippet is that the dimension doesn't point to a connection directly. Instead, the dimension references a schema, that references a database, that references the connection.

You are not authorized to comment. A verification email has been sent to your email address. Please verify your account.


There are no comments yet.