[Mondrian] Changing Levels in a Hierarchy of a Dimension

Matt Campbell mcampbell at pentaho.com
Mon Apr 28 08:53:52 EDT 2014


It sounds like [Branch] is a type 1 slowly changing dimension-- i.e. values for STATE_NAME for particular branches are simply changed over time and you are not maintaining any history of attribute values.  Given that, I think your only real option is to update the reports.  The unique name specified is no longer valid.

Since the [Branch] level has unique members, you could change the references to be something like this:

 [Branch.StateCity].[Branch].[1185058062]

Presumably the branch identifier does not change, so you would not need to update reports when the city or state changes in the future.


________________________________________
From: mondrian-bounces at pentaho.org [mondrian-bounces at pentaho.org] On Behalf Of m.xinu [mehdi_xinu at yahoo.com]
Sent: Saturday, April 26, 2014 10:32 AM
To: Mondrian
Subject: [Mondrian] Changing Levels in a Hierarchy of a Dimension

Hi,
I'm using mondrian 3.3.0.14703. I have a shared dimension as follows:

    <Dimension name="Branch">
        <Hierarchy name="StateCity" primaryKey="BRANCH_ID" hasAll="true" allMemberName="All">
            <Table schema="BIDWH" name="COR_DM_BRANCH" />

            <Level name="State" column="STATE_ID" captionColumn="STATE_NAME" uniqueMembers="true" internalType="long"/>
            <Level name="City" column="CITY_ID" captionColumn="CITY_NAME" uniqueMembers="true" internalType="long"/>
            <Level name="Branch" column="BRANCH_ID" captionColumn="BRANCH_NAME" uniqueMembers="true" internalType="long"/>
        </Hierarchy>

        <Hierarchy name="BranchGroup" primaryKey="BRANCH_ID" hasAll="true" allMemberName="All">
            <Table schema="BIDWH" name="COR_DM_BRANCHGROUP" />

            <Level name="BranchGroup" column="BRANCHGROUP_ID" captionColumn="BRANCHGROUP_NAME" uniqueMembers="true" internalType="long" />
        </Hierarchy>
    </Dimension>

So when I execute an MDX, a sample member returned for this dimension is [Branch.StateCity].[6578].[13091].[1185058062]. When user wants to use this member in a report, its complete name (e.g. [Branch.StateCity].[6578].[13091].[1185058062]) is saved in the report.

But when the city and state of that branch is changed (e.g. [Branch.StateCity].[12777].[13091].[1185058062]), the saved report can't be executed, because mondrian can't find the old member.

What can I do?
Please remember that I saved the fully qualified name of old member in a report.


More information about the Mondrian mailing list