I need to create an OLAP View just from one table in MySQL.
I need to get information from the following columns in my table:
- loginNote
- logoutNote
- timestamp
- userFirstName
So I created this Mondrian Schema:
<Schema name="Login">
<Cube name="Login" visible="true" cache="true" enabled="true">
<Table name="event_log">
</Table>
<Dimension visible="true" highCardinality="false" name="UserFirstName">
<Hierarchy visible="true" hasAll="true" allMemberName="All UserFirstName">
<Level name="UserFirstName" visible="true" column="userFirstName" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension visible="true" highCardinality="false" name="LoginNote">
<Hierarchy visible="true" hasAll="true" allMemberName="All LoginNote">
<Level name="LoginNote" visible="true" column="loginNote" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension visible="true" highCardinality="false" name="LogoutNote">
<Hierarchy visible="true" hasAll="true" allMemberName="All UserFirstName">
<Level name="LogoutNote" visible="true" column="logoutNote" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Measure name="Users" column="userFirstName" aggregator="count" description="Users">
</Measure>
I would like to know how can I run a MDX query to be able to show on the rows the LoginNote and LogoutNote information, and in the columns, the UserFirstName.
I was able to run
Select
UserFirstName.Children ON COLUMNS,
LogoutNote.Children ON ROWS
FROM Login
or
Select
UserFirstName.Children ON COLUMNS,
LoginNote.Children ON ROWS
FROM Login
but I cannot run
Select
UserFirstName.Children ON COLUMNS,
{LogoutNote.Children,LoginNote.Children} ON ROWS
FROM Login
because an error is returned:
All arguments to function '{}' must have same hierarchy.
Any help will be appreciated!
Thanks!