Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set one single level directly as a hierarchy (AttributeHierarchy Request) #1435

Open
xiaobao520123 opened this issue Nov 20, 2024 · 4 comments

Comments

@xiaobao520123
Copy link

Before moving to Mondrian, we're using SSAS to do multidimensional data modeling.
SSAS natively supports AttributeHierarchy, which means by default a single column can directly serve as a hierarchy without we specifically design or create one.

We use Excel as the front-end, and we present the data as a PivotTable.
Now with Mondrian, according to its logical model, I have to create a dimension/hierarchy/level schema to present data and do filtering/measurement.

For Mondrian, is there any feature or configuration that can resemble SSAS's AttributeHierarchy?.
It seems Mondrian treats every hierarchy as a User-Define Hierarchy. We want a single column to be created as a hierarchy by default.

@Kuaffu
Copy link

Kuaffu commented Nov 27, 2024

In Mondrian 4.x, there was a feature that allowed creating a default hierarchy for a single column using the hasHierarchy attribute in the tag. Setting hasHierarchy='true' would generate a default hierarchy for the specified column.
Example:
<Dimension name='Time' table='my_time_by_day' type='TIME' key='Time Id'> <Attributes> <Attribute name='Time Id' keyColumn='time_id' hasHierarchy='false'/> <Attribute name='Year' keyColumn='the_year' levelType='TimeYears' hasHierarchy='true'/> <Attribute name='Quarter' levelType='TimeQuarters' keyColumn='quarter' hasHierarchy='true'/> <Attribute name='Month' levelType='TimeMonths' keyColumn='month_of_year' hasHierarchy='true'/> </Attributes> </Dimension>
Unfortunately, the Mondrian team abandoned the 4.x branch and did not retain compatibility with its features in subsequent releases. As of now, Mondrian does not seem to support a configuration equivalent to SSAS's AttributeHierarchy.

@xiaobao520123
Copy link
Author

@Kuaffu could you please tell me the last version they had this feature? I might have a look at it.

@Kuaffu
Copy link

Kuaffu commented Nov 28, 2024

You can try Mondrian 4.7, which had the hasHierarchy feature. If you want to compile it locally, the latest repository is hosted at this URL. Unfortunately, access to the repository currently requires authentication.

@xiaobao520123
Copy link
Author

@Kuaffu Thank you for providing evidence. Fortunately, I've found something very interesting in the latest master version.
Permalink:

<xs:attribute name="origin" type="xs:unsignedShort"> <!-- New --> <!-- TODO check what this is... what values should be settable. type inferred from mondrian.xmla.RowsetDefinition class. -->

When I set this 'origin' attribute to 6, hierarchies will be presented exactly as AttributeHierarchy, accroding to Microsoft OLE DB documentation.

Interestingly, developers from Mondrian don't even know what this attribute 'origin' is. But that's actually what I've been looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants