Search code examples
ssasolapbusiness-intelligencexmla

SSAS - Is it possible to add an attribute to an existing dimension w/o redeploying the entire cube


I have a dimension Entity with just Key and Value attributes. We need to add a new attribute, IsSpecial with a default member of [False].

When I try to run the xmla, I get the following error:

Errors in the metadata manager. The cube with the ID of 'X', Name of 'Y' was invalidated by operations in the transaction.

Here's a fragment of the XMLA used to alter the dimension

<Dimension>
    <ID>Dim Entity</ID>
    <Name>Entity</Name>
    <UnknownMemberName>Unknown</UnknownMemberName>
    <Attributes>
        <Attribute>
            <ID>Dim Entity</ID>
            <Name>Entity</Name>
            <Usage>Key</Usage>
            <EstimatedCount>119</EstimatedCount>
            <KeyColumns>
                <KeyColumn>
                    <DataType>Integer</DataType>
                    <Source xsi:type="ColumnBinding">
                        <TableID>shared_DimEntity</TableID>
                        <ColumnID>EntityKey</ColumnID>
                    </Source>
                </KeyColumn>
            </KeyColumns>
            <NameColumn>
                <DataType>WChar</DataType>
                <DataSize>32</DataSize>
                <Source xsi:type="ColumnBinding">
                    <TableID>shared_DimEntity</TableID>
                    <ColumnID>EntityValue</ColumnID>
                </Source>
            </NameColumn>
            <AttributeRelationships>
                <AttributeRelationship>
                    <AttributeID>IsSpecial</AttributeID>
                    <Name>IsSpecial</Name>
                </AttributeRelationship>
            </AttributeRelationships>
        </Attribute>
        <Attribute>
            <ID>IsSpecial</ID>
            <Name>IsSpecial</Name>
            <KeyColumns>
                <KeyColumn>
                    <DataType>Boolean</DataType>
                    <Source xsi:type="ColumnBinding">
                        <TableID>shared_DimEntity</TableID>
                        <ColumnID>IsShadowTracking</ColumnID>
                    </Source>
                </KeyColumn>
            </KeyColumns>
            <NameColumn>
                <DataType>WChar</DataType>
                <Source xsi:type="ColumnBinding">
                    <TableID>shared_DimEntity</TableID>
                    <ColumnID>IsShadowTracking</ColumnID>
                </Source>
            </NameColumn>
            <DefaultMember>[Entity].[IsSpecial].[False]</DefaultMember>
        </Attribute>
    </Attributes>
    <Hierarchies>
        <Hierarchy>
            <ID>Hierarchy</ID>
            <Name>Hierarchy</Name>
            <Levels>
                <Level>
                    <ID>IsSpecial</ID>
                    <Name>IsSpecial</Name>
                    <SourceAttributeID>IsSpecial</SourceAttributeID>
                </Level>
            </Levels>
        </Hierarchy>
    </Hierarchies>
</Dimension>

Any suggestions?


Solution

  • I doubt there is a way of doing this.
    When changing dimension model you also modify cubes which use that dimension. Without redeploying the whole cube, metadata manager doesn't know about changes in cube.

    The same situation occurs when changing dimensions in BIDS on-line - appropriate cubes are affected so they need to be deployed again.