Uploaded image for project: 'Pentaho Analysis - Mondrian'
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-441

Mondrian: Parent-child hierarchies: <Join> used in dimension

    Details

    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.

      Description

      I have a parent-child hierarchy that's also a multi-valued dimension. To deal with this I have a bridge table between the fact & dimension table. The dimension table has a key to the bridge table, the bridge has a foreign key to the dimension table.

      Within the schema I have:

      <Join leftAlias="bridge" leftKey="child_fk" rightAlias="dimension" rightKey="child_tk">
      <Table name="bridge" />
      <Table name="dimension" />
      </Join>

      ... for the hierarchy, and:

      <Level ... >
      <Closure parentColumn="parent_fk" childColumn="child_tk">
      <Table name="closure" />
      </Closure>
      </Level>

      When the dimension is used in the primary cube, I specify the key name within the fact table:

      <DimensionUsage source="Dimension" name="Dimension" foreignKey="au_fk" />

      ... and within the dimension itself I set the hierarchy's primary key:

      <Hierarchy name="Dimension" hasAll="true" allMemberName="All" allLevelName="All" primaryKey="au_fk" primaryKeyTable="bridge">
      ...
      </Hierarchy>

      The problem is that the closure table's childKey is joined against the fact table's foreign key. Properly speaking, it should be joined against the bridge table.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                phantal Brian Vandenberg
              • Votes:
                3 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated: