Error loading pentaho cube using saiku - pentaho

Saiku plugin 2.5 for Pentaho 4.8, windows 7 , oracle 10g.
When starting the Saiku analytics view i'm getting this error:
name:puc1
driver:mondrian.olap4j.MondrianOlap4jDriver
url:jdbc:mondrian:Provider=mondrian; DataSource=haki;Catalog=solution:admin/resources/metadata/puc1.mondrian.xml
mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while loading plugin class 'org.saiku.plugin.PentahoDataSourceResolver'
My oracle db instance / name is haki, the connection i created in the pac named haki as well. the cube works on the analytics view but not showing in the saiku anlytics.
this is the file located in admin/resources/metadata/puc1.mondrian.xml :
type=OLAP
name=haki
driver=mondrian.olap4j.MondrianOlap4jDriver
location=jdbc:mondrian:Jdbc=jdbc:oracle:thin:#localhost:haki;Catalog=C:\Pentaho\biserver-ce\pentaho-solutions\Haki\puc1.mondrian.xml;JdbcDrivers=oracle.jdbc.OracleDriver
username=pentaho
password=pentaho
this is my schema
<?xml version="1.0" encoding="UTF-8"?>
<Schema name="puc1">
<Dimension name="DEPT">
<Hierarchy name="DEPTNO" hasAll="true" primaryKey="DEPTNO">
<Table name=""DEPT"" schema=""SCOTT""/>
<Level name="DEPTNO" column="DEPTNO" type="Numeric" uniqueMembers="false">
</Level>
</Hierarchy>
<Hierarchy name="DNAME" hasAll="true" primaryKey="DEPTNO">
<Table name=""DEPT"" schema=""SCOTT""/>
<Level name="DNAME" column="DNAME" type="String" uniqueMembers="false">
</Level>
</Hierarchy>
<Hierarchy name="LOC" hasAll="true" primaryKey="DEPTNO">
<Table name=""DEPT"" schema=""SCOTT""/>
<Level name="LOC" column="LOC" type="String" uniqueMembers="false">
</Level>
</Hierarchy>
</Dimension>
<Cube name="puc1">
<Table name=""EMP"" schema=""SCOTT""/>
<DimensionUsage name="DEPT" source="DEPT" foreignKey="DEPTNO"/>
<Measure name="COMM" column="COMM" aggregator="sum" formatString="#"/>
<Measure name="DEPTNO" column="DEPTNO" aggregator="sum" formatString="#"/>
<Measure name="EMPNO" column="EMPNO" aggregator="sum" formatString="#"/>
<Measure name="MGR" column="MGR" aggregator="sum" formatString="#"/>
<Measure name="SAL" column="SAL" aggregator="sum" formatString="#"/>
</Cube>
</Schema>
I would appreciate any help.
full dump
12:28:35,139 DEBUG [AbstractSpringPentahoObjectFactory] Got an instance of [ISolutionRepository]: org.pentaho.platform.repository.solution.dbbased.DbBasedSolutionRepository#48d8fe
name:puc1
driver:mondrian.olap4j.MondrianOlap4jDriver
url:jdbc:mondrian:Provider=mondrian; DataSource=haki;Catalog=solution:admin/resources/metadata/puc1.mondrian.xml
mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while loading plugin class 'org.saiku.plugin.PentahoDataSourceResolver'
at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:967)
at mondrian.olap.Util.newInternal(Util.java:2400)
at mondrian.rolap.RolapConnection.getDataSourceResolver(RolapConnection.java:480)
at mondrian.rolap.RolapConnection.createDataSource(RolapConnection.java:426)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:134)
at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:90)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:112)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:68)
at mondrian.olap4j.MondrianOlap4jConnection.<init>(MondrianOlap4jConnection.java:140)
at mondrian.olap4j.FactoryJdbc4Plus$AbstractConnection.<init>(FactoryJdbc4Plus.java:323)
at mondrian.olap4j.FactoryJdbc41Impl$MondrianOlap4jConnectionJdbc41.<init>(FactoryJdbc41Impl.java:118)
at mondrian.olap4j.FactoryJdbc41Impl.newConnection(FactoryJdbc41Impl.java:32)
at mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:132)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at org.saiku.datasources.connection.SaikuOlapConnection.connect(SaikuOlapConnection.java:75)
at org.saiku.datasources.connection.SaikuOlapConnection.connect(SaikuOlapConnection.java:46)
at org.saiku.datasources.connection.SaikuConnectionFactory.getConnection(SaikuConnectionFactory.java:29)
at org.saiku.plugin.PentahoSecurityAwareConnectionManager.connect(PentahoSecurityAwareConnectionManager.java:181)
at org.saiku.plugin.PentahoSecurityAwareConnectionManager.getInternalConnection(PentahoSecurityAwareConnectionManager.java:72)
at org.saiku.plugin.PentahoSecurityAwareConnectionManager.refreshInternalConnection(PentahoSecurityAwareConnectionManager.java:114)
at org.saiku.datasources.connection.AbstractConnectionManager.refreshConnection(AbstractConnectionManager.java:112)
at org.saiku.datasources.connection.AbstractConnectionManager.refreshAllConnections(AbstractConnectionManager.java:105)
at org.saiku.service.olap.OlapDiscoverService.refreshAllConnections(OlapDiscoverService.java:77)
at org.saiku.web.rest.resources.OlapDiscoverResource.refreshConnections(OlapDiscoverResource.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:288)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1469)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1400)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
at org.codehaus.enunciate.modules.jersey.EnunciateJerseyServletContainer.service(EnunciateJerseyServletContainer.java:248)
at org.saiku.plugin.EnunciateJerseyPluginServlet.service(EnunciateJerseyPluginServlet.java:91)
at org.saiku.plugin.ServletAdapterContentGenerator.createSaikuContent(ServletAdapterContentGenerator.java:207)
at org.saiku.plugin.ServletAdapterContentGenerator.createContent(ServletAdapterContentGenerator.java:91)
at org.pentaho.platform.web.servlet.GenericServlet.doGet(GenericServlet.java:261)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.pentaho.platform.web.http.filters.PentahoWebContextFilter.doFilter(PentahoWebContextFilter.java:142)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.pentaho.platform.web.http.filters.PentahoRequestContextFilter.doFilter(PentahoRequestContextFilter.java:84)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.pentaho.platform.web.http.security.SecurityStartupFilter.doFilter(SecurityStartupFilter.java:103)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.pentaho.platform.web.http.security.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:169)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.pentaho.platform.web.http.security.HttpSessionReuseDetectionFilter.doFilter(HttpSessionReuseDetectionFilter.java:134)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.pentaho.platform.web.http.filters.SystemStatusFilter.doFilter(SystemStatusFilter.java:60)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.pentaho.platform.web.http.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:113)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.ClassNotFoundException: org.saiku.plugin.PentahoDataSourceResolver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1645)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1491)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:190)
at mondrian.rolap.RolapConnection.getDataSourceResolver(RolapConnection.java:471)
... 107 more

Related

Mondrian MDX Query error:- All arguments to function '{}' must have same hierarchy

I am using Tibco Jaspersoft to generate the report.
Expected result:-
Created Schema File:
<Schema name="Telemetry Count Schema">
<Cube name="Telemetry Count Cube" cache="true" enabled="true">
<Table name="device_telementry">
</Table>
<Dimension type="StandardDimension" foreignKey="companyId" name="Tenant">
<Hierarchy hasAll="true" allMemberName="All Tenant" primaryKey="id">
<Table name="device">
</Table>
<Level name="Tenant Level " column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" foreignKey="subscriptionId" name="Subscription">
<Hierarchy hasAll="true" allMemberName="All Subscription" primaryKey="id">
<Table name="subscription">
</Table>
<Level name="Subscription Level" column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" foreignKey="applicationId" name="Application">
<Hierarchy hasAll="true" allMemberName="All Application" primaryKey="id">
<Table name="application">
</Table>
<Level name="Application Level" column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" foreignKey="gatewayId" name="Gateway">
<Hierarchy hasAll="true" allMemberName="All Gateway" primaryKey="id">
<Table name="gateway">
</Table>
<Level name="Gateway Level" column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" foreignKey="deviceId" name="Device">
<Hierarchy hasAll="true" allMemberName="All Device" primaryKey="id">
<Table name="device">
</Table>
<Level name="Device Level" column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Measure name="Telemetry Count" column="telemetry_count" aggregator="sum" visible="true">
</Measure>
<Measure name="Telemetry Item Count" column="telemetry_item_count" aggregator="count" visible="true">
</Measure>
</Cube>
</Schema>
MDX Query:-
select {[Measures].[Telemetry Count], [Measures].[Telemetry Item Count]} ON COLUMNS,
{[Gateway].[All Gateway], [Gateway].[All Gateway].Children, [Device].[All Device], [Device].[All Device].Children} ON ROWS
from [Telemetry Count Cube]
Error Message:
Mondrian Error: All arguments to function '{}' must have same
hierarchy.
What am I doing wrong here?
Resultant MDX Query:-
select {[Measures].[Telemetry Count], [Measures].[Telemetry Item Count]} ON COLUMNS,
NON EMPTY
{ CrossJoin ( {([Application].members)}, {CrossJoin ( {([Gateway].members)}, {([Device].members)} ) }) }
ON ROWS
from [Telemetry Count Cube]

Logical error in Mondrian cube

I am using this cube to retrieve data from my OLTP Database
<?xml version="1.0"?>
<Schema name="Test36">
<Cube name="Test36Cube">
<Table name="fact_table"/>
<Dimension name="Year Month Day" foreignKey="id_date">
<Hierarchy hasAll="false" primaryKey="id_date">
<Table name="transaction_date"/>
<Level name="Year" column="year" uniqueMembers="true" levelType="TimeYears" type="Numeric"/>
<Level name="Month" column="month" uniqueMembers="false" ordinalColumn="monthNumber" nameColumn="month" levelType="TimeMonths" type="Numeric"/>
<Level name="Day" column="day" uniqueMembers="false" levelType="TimeDays" type="Numeric"/>
</Hierarchy>
</Dimension>
<Dimension name="Txn type">
<Hierarchy hasAll="false">
<Level name="txn type" column="tx_type" uniqueMembers="true"/>
</Hierarchy>
</Dimension>
<Measure name="Amount" column="tx_amount" aggregator="sum" formatString="Standard"/>
</Cube>
</Schema>
When I add the dimension "Txn type", data for "year month day" is not loaded for each month. Data for only some months is retrived. I am not able to understand the reason behind this error. Can anybody help?

Empty cells/offset in the report: how to define a dimension and hierarchy in the cube?

I want to analyze some dynamics of the some process. For that I use Saiku analytics plugin CE for Pentaho Business Intelligence Server CE 5.0.1.
There is a table of facts and a table of dimensions that using to perform some aggregations. Dimensions represent the hierarchy "Year - Month - Day".
I built some report in two cuts - by year and months. Report looks as follows:
The data it shows is correct:
If I define an independent dimension "Month", the report is looks right:
However, the data already is not right:
I tried to add the inverse dimension "Month - Year", but did not see any data.
Is there a way to define a dimension, where the report will not include empty cells?
I found the solution - the problem was in the wrong dimension of date.
See detailed answer here: Create a date range in mysql
New Mondrian schema:
<Schema name="MondrianSchema">
<Dimension type="TimeDimension" visible="true" highCardinality="false" name="X dimension">
<Hierarchy name="X_hierarchy" visible="true" hasAll="true" primaryKey="date_key">
<Table name="tbl_declaration_date_dim" schema="dbo">
</Table>
<Level name="Year" visible="true" table="tbl_declaration_date_dim" column="Year" nameColumn="Year" type="Numeric" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never">
</Level>
<Level name="Month" visible="true" table="tbl_declaration_date_dim" column="Month" nameColumn="Month" ordinalColumn="Month" type="Numeric" uniqueMembers="false" levelType="TimeMonths" hideMemberIf="Never">
</Level>
<Level name="Day" visible="true" table="tbl_declaration_date_dim" column="Day" nameColumn="Day" ordinalColumn="Day" type="Numeric" uniqueMembers="false" levelType="TimeDays" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="TimeDimension" visible="true" name="Y dimension">
<Hierarchy name="Y_Hierarchy" visible="true" hasAll="true" primaryKey="date_key">
<Table name="tbl_declaration_date_dim" schema="dbo" alias="">
</Table>
<Level name="Year" visible="true" table="tbl_declaration_date_dim" column="Year" nameColumn="Year" type="Numeric" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never">
</Level>
<Level name="Month" visible="true" table="tbl_declaration_date_dim" column="Month" nameColumn="Month" ordinalColumn="Month" type="Numeric" uniqueMembers="false" levelType="TimeMonths" hideMemberIf="Never">
</Level>
<Level name="Day" visible="true" table="tbl_declaration_date_dim" column="Day" nameColumn="Day" ordinalColumn="Day" type="Numeric" uniqueMembers="false" levelType="TimeDays" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Cube name="tbl_application_cube" caption="..." visible="true" description="..." cache="true" enabled="true">
<Table name="tbl_appl_olap_fact" schema="dbo">
</Table>
<DimensionUsage source="X dimension" name="X axis" visible="true" foreignKey="date_dim" highCardinality="false">
</DimensionUsage>
<DimensionUsage source="Y dimension" name="Y axis" visible="true" foreignKey="date_dim">
</DimensionUsage>
<Measure name="DeclarationCount" column="declaration_id" aggregator="count" visible="true">
</Measure>
</Cube>
</Schema>

Performance issue with MDX query

I'm trying to get top 5 records from MySQL database based on some filters using below MDX query and cube definition.But, this query takes more time for execution and this works fine when we have less no.of FILE_NUM's in where condition. Please suggest how to rewrite this query to gain performance.
MDX Query:
SELECT {[Measures].[BBLSOIL_TOTAL], [Measures].[MCF_PROD_TOTAL],
[Measures].[AVG.DAYS]} ON COLUMNS,
{TOPCOUNT(FILTER([WELL_ID].[WellIds].MEMBERS, [WELL_ID].CurrentMember
0),5,[Measures].[BBLSOIL_TOTAL])} ON ROWS FROM [MON_KPI_CHARTS] WHERE({[Date].&[2015-09-01
00:00:00.0]}*{[FILE_NUM].[1],[FILE_NUM].[10],[FILE_NUM].[18],[FILE_NUM].[47],[FILE_NUM].[52],[FILE_NUM].[105],[FILE_NUM].[126],[FILE_NUM].[392],[FILE_NUM].[588],[FILE_NUM].[656],[FILE_NUM].[995],[FILE_NUM].[1005],[FILE_NUM].[1010],[FILE_NUM].[1061],[FILE_NUM].[1128],[FILE_NUM].[1137],[FILE_NUM].[1138],[FILE_NUM].[1337],[FILE_NUM].[1340],[FILE_NUM].[1410],[FILE_NUM].[1438],[FILE_NUM].[1503],[FILE_NUM].[1628],[FILE_NUM].[1698],[FILE_NUM].[1801],[FILE_NUM].[1808],[FILE_NUM].[1843],[FILE_NUM].[1876],[FILE_NUM].[1885],[FILE_NUM].[2017],[FILE_NUM].[2051],[FILE_NUM].[2053],[FILE_NUM].[2134],[FILE_NUM].[2929],[FILE_NUM].[2930],[FILE_NUM].[2931],[FILE_NUM].[2946],[FILE_NUM].[2979],[FILE_NUM].[3039],[FILE_NUM].[3080],[FILE_NUM].[3087],[FILE_NUM].[3124],[FILE_NUM].[3125],[FILE_NUM].[3165],[FILE_NUM].[3166],[FILE_NUM].[3237],[FILE_NUM].[3256],[FILE_NUM].[3314],[FILE_NUM].[3421],[FILE_NUM].[3445],[FILE_NUM].[3485],[FILE_NUM].[3493],[FILE_NUM].[3501],[FILE_NUM].[3552],[FILE_NUM].[3557],[FILE_NUM].[3622],[FILE_NUM].[3795],[FILE_NUM].[3812],[FILE_NUM].[3824],[FILE_NUM].[3837],[FILE_NUM].[3858],[FILE_NUM].[3884],[FILE_NUM].[3952],[FILE_NUM].[3963],[FILE_NUM].[3984],[FILE_NUM].[3995],[FILE_NUM].[4021],[FILE_NUM].[4030],[FILE_NUM].[4097],[FILE_NUM].[4117],[FILE_NUM].[4142],[FILE_NUM].[4145],[FILE_NUM].[4153],[FILE_NUM].[4155],[FILE_NUM].[4159],[FILE_NUM].[4161],[FILE_NUM].[4190],[FILE_NUM].[4209],[FILE_NUM].[4216],[FILE_NUM].[4223],[FILE_NUM].[4251],[FILE_NUM].[4255],[FILE_NUM].[4303],[FILE_NUM].[4313],[FILE_NUM].[4315],[FILE_NUM].[4329],[FILE_NUM].[4343],[FILE_NUM].[4346],[FILE_NUM].[4356],[FILE_NUM].[4366],[FILE_NUM].[4372],[FILE_NUM].[4400],[FILE_NUM].[4401],[FILE_NUM].[4409],[FILE_NUM].[4422],[FILE_NUM].[4443],[FILE_NUM].[4484],[FILE_NUM].[4501],[FILE_NUM].[4539],[FILE_NUM].[4569],[FILE_NUM].[4630],[FILE_NUM].[4638],[FILE_NUM].[4639],[FILE_NUM].[4658],[FILE_NUM].[4686],[FILE_NUM].[4698],[FILE_NUM].[4699],[FILE_NUM].[4768],[FILE_NUM].[4775],[FILE_NUM].[4794],[FILE_NUM].[4799],[FILE_NUM].[4803],[FILE_NUM].[4805],[FILE_NUM].[4835],[FILE_NUM].[4891],[FILE_NUM].[4923],[FILE_NUM].[4925],[FILE_NUM].[4929],[FILE_NUM].[4950],[FILE_NUM].[4956],[FILE_NUM].[4961],[FILE_NUM].[4978],[FILE_NUM].[4987],[FILE_NUM].[4990],[FILE_NUM].[4992],[FILE_NUM].[4996],[FILE_NUM].[5020],[FILE_NUM].[5025],[FILE_NUM].[5026],[FILE_NUM].[5048],[FILE_NUM].[5057],[FILE_NUM].[5058],[FILE_NUM].[5067],[FILE_NUM].[5074],[FILE_NUM].[5075],[FILE_NUM].[5077],[FILE_NUM].[5079],[FILE_NUM].[5080],[FILE_NUM].[5090],[FILE_NUM].[5095],[FILE_NUM].[5096],[FILE_NUM].[5098],[FILE_NUM].[5103],[FILE_NUM].[5105],[FILE_NUM].[5139],[FILE_NUM].[5149],[FILE_NUM].[5154],[FILE_NUM].[5158],[FILE_NUM].[5165],[FILE_NUM].[5180],[FILE_NUM].[5198],[FILE_NUM].[5199],[FILE_NUM].[5207],[FILE_NUM].[5215],[FILE_NUM].[5219],[FILE_NUM].[5223],[FILE_NUM].[5236],[FILE_NUM].[5242],[FILE_NUM].[5275],[FILE_NUM].[5300],[FILE_NUM].[5304],[FILE_NUM].[5313],[FILE_NUM].[5321],[FILE_NUM].[5356],[FILE_NUM].[5368],[FILE_NUM].[5389],[FILE_NUM].[5401],[FILE_NUM].[5444],[FILE_NUM].[5457],[FILE_NUM].[5467],[FILE_NUM].[5468],[FILE_NUM].[5498],[FILE_NUM].[5519],[FILE_NUM].[5520],[FILE_NUM].[5531],[FILE_NUM].[5539],[FILE_NUM].[5542],[FILE_NUM].[5563],[FILE_NUM].[5578],[FILE_NUM].[5707],[FILE_NUM].[5723],[FILE_NUM].[5761],[FILE_NUM].[5785],[FILE_NUM].[5795],[FILE_NUM].[5809],[FILE_NUM].[5830],[FILE_NUM].[5860],[FILE_NUM].[5903],[FILE_NUM].[5923],[FILE_NUM].[5962],[FILE_NUM].[5966],[FILE_NUM].[5970],[FILE_NUM].[5996],[FILE_NUM].[6005],[FILE_NUM].[6006],[FILE_NUM].[6008],[FILE_NUM].[6012],[FILE_NUM].[6023],[FILE_NUM].[6032],[FILE_NUM].[6041],[FILE_NUM].[6043],[FILE_NUM].[6073],[FILE_NUM].[6100],[FILE_NUM].[6150],[FILE_NUM].[6201],[FILE_NUM].[6223],[FILE_NUM].[6271],[FILE_NUM].[6295],[FILE_NUM].[6314],[FILE_NUM].[6404],[FILE_NUM].[6440],[FILE_NUM].[6459],[FILE_NUM].[6482],[FILE_NUM].[6486],[FILE_NUM].[6502],[FILE_NUM].[6540],[FILE_NUM].[6588],[FILE_NUM].[6610],[FILE_NUM].[6637],[FILE_NUM].[6653],[FILE_NUM].[6664],[FILE_NUM].[6725],[FILE_NUM].[6819],[FILE_NUM].[6871],[FILE_NUM].[6932],[FILE_NUM].[6934],[FILE_NUM].[6978],[FILE_NUM].[7009],[FILE_NUM].[7042],[FILE_NUM].[7043],[FILE_NUM].[7055],[FILE_NUM].[7493],[FILE_NUM].[7547],[FILE_NUM].[7554],[FILE_NUM].[7612],[FILE_NUM].[7624],[FILE_NUM].[7638],[FILE_NUM].[7646],[FILE_NUM].[7671],[FILE_NUM].[7693],[FILE_NUM].[7695],[FILE_NUM].[7696],[FILE_NUM].[7697],[FILE_NUM].[7698],[FILE_NUM].[7708],[FILE_NUM].[7710],[FILE_NUM].[7711],[FILE_NUM].[7862],[FILE_NUM].[7910],[FILE_NUM].[7927],[FILE_NUM].[7960],[FILE_NUM].[7962],[FILE_NUM].[8009],[FILE_NUM].[8033],[FILE_NUM].[8056],[FILE_NUM].[8057],[FILE_NUM].[8104],[FILE_NUM].[8109],[FILE_NUM].[8170],[FILE_NUM].[8177],[FILE_NUM].[8181],[FILE_NUM].[8211],[FILE_NUM].[8323],[FILE_NUM].[8376],[FILE_NUM].[8412],[FILE_NUM].[8475],[FILE_NUM].[8541],[FILE_NUM].[8547],[FILE_NUM].[8578],[FILE_NUM].[8654],[FILE_NUM].[8691],[FILE_NUM].[8697],[FILE_NUM].[8699],[FILE_NUM].[8749],[FILE_NUM].[8763],[FILE_NUM].[8790],[FILE_NUM].[8840],[FILE_NUM].[8870],[FILE_NUM].[8939],[FILE_NUM].[9036],[FILE_NUM].[9077],[FILE_NUM].[9094],[FILE_NUM].[9107],[FILE_NUM].[9149],[FILE_NUM].[9150],[FILE_NUM].[9293],[FILE_NUM].[9429],[FILE_NUM].[9499],[FILE_NUM].[9550],[FILE_NUM].[9571],[FILE_NUM].[9579],[FILE_NUM].[9752],[FILE_NUM].[9910],[FILE_NUM].[9953],[FILE_NUM].[10270],[FILE_NUM].[10271],[FILE_NUM].[10272],[FILE_NUM].[10273],[FILE_NUM].[10274],[FILE_NUM].[10275],[FILE_NUM].[10309],[FILE_NUM].[10326],[FILE_NUM].[10403],[FILE_NUM].[10408],[FILE_NUM].[10471],[FILE_NUM].[10491],[FILE_NUM].[10496],[FILE_NUM].[10505],[FILE_NUM].[10551],[FILE_NUM].[10572],[FILE_NUM].[10601],[FILE_NUM].[10615],[FILE_NUM].[10679],[FILE_NUM].[10725],[FILE_NUM].[10778],[FILE_NUM].[10819],[FILE_NUM].[11002],[FILE_NUM].[11042],[FILE_NUM].[11055],[FILE_NUM].[11076],[FILE_NUM].[11095],[FILE_NUM].[11112],[FILE_NUM].[11213],[FILE_NUM].[11249],[FILE_NUM].[11308],[FILE_NUM].[11311],[FILE_NUM].[11486],[FILE_NUM].[11555]})
Cube Definition:
<Schema name="ONG" description="Schema for RIAB">
<Dimension type="StandardDimension" visible="true" highCardinality="false" name="Location">
<Hierarchy name="LOCATION_HIR" visible="true" hasAll="true" allMemberName="AllLocations" primaryKey="FILE_NO">
<Table name="mas_well_spatial_dim">
</Table>
<Level name="Township" visible="true" column="TOWNSHIP" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
<Level name="Range" visible="true" column="RANGE" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
<Level name="Section" visible="true" column="SECTION" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
<Level name="CountyName" visible="true" column="COUNTY_NAME" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
<Level name="FieldName" visible="true" column="FIELD_NAME" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" visible="true" highCardinality="false" name="WellIndex">
<Hierarchy name="WellIndex_HIR" visible="true" hasAll="true" allMemberName="AllWellIndexes" primaryKey="FILE_NO">
<Table name="mas_well_index">
</Table>
<Level name="Wellbore" visible="true" column="WELL_BORE" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
<Level name="TotalDepth" visible="true" column="TOTAL_DEPTH" type="Integer" internalType="int" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
<Level name="CurrentOperator" visible="true" column="CURRENT_OPERATOR" type="String" internalType="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
<Level name="OriginalOperator" visible="true" column="ORIGINAL_OPERATOR" type="String" internalType="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
<Level name="SpudDate" visible="true" column="SPUD_DATE" type="Date" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
<Level name="WellStatus" visible="true" column="WELL_STATUS" type="String" internalType="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
<Level name="WellType" visible="true" column="WELL_TYPE" type="String" internalType="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" visible="true" name="FIELD_NAME">
<Hierarchy name="FIELD_NAME_HIR" visible="true" hasAll="true" allMemberName="AllFieldNames" primaryKey="FILE_NO">
<Table name="mas_well_spatial_dim">
</Table>
<Level name="FIELD_NAME" visible="true" column="FIELD_NAME" type="String" internalType="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" visible="true" highCardinality="false" name="FILE_NUM">
<Hierarchy name="FILE_NUM_HIR" visible="true" hasAll="true" allMemberName="AllFileNos" primaryKey="FILE_NO">
<Table name="mas_well_index">
</Table>
<Level name="FileNos" visible="true" column="FILE_NO" type="Numeric" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Cube name="MON_KPI_CHARTS" visible="true" cache="true" enabled="true">
<Table name="prd_well_production_monthly">
</Table>
<Dimension type="TimeDimension" visible="true" foreignKey="DATE_ID" highCardinality="false" name="TIME">
<Hierarchy name="Quaterly" visible="true" hasAll="true" primaryKey="DATE_ID">
<Table name="mas_date_temporal_dim">
</Table>
<Level name="Year" visible="true" table="mas_date_temporal_dim" column="YEAR" type="Integer" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never">
</Level>
<Level name="Quarter" visible="true" table="mas_date_temporal_dim" column="QUARTER" type="String" uniqueMembers="false" levelType="TimeQuarters" hideMemberIf="Never">
</Level>
<Level name="Month" visible="true" table="mas_date_temporal_dim" column="MONTH" type="String" uniqueMembers="false" levelType="TimeMonths" hideMemberIf="Never">
</Level>
</Hierarchy>
<Hierarchy name="Monthly" visible="true" hasAll="true" primaryKey="DATE_ID">
<Table name="mas_date_temporal_dim">
</Table>
<Level name="Year" visible="true" table="mas_date_temporal_dim" column="YEAR" type="Integer" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never">
</Level>
<Level name="Month" visible="true" table="mas_date_temporal_dim" column="MONTH" type="String" uniqueMembers="false" levelType="TimeMonths" hideMemberIf="Never">
</Level>
<Level name="Day" visible="true" table="mas_date_temporal_dim" column="DAY" type="Integer" uniqueMembers="false" levelType="TimeDays" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" visible="true" foreignKey="FILE_NO" highCardinality="false" name="WELL_ID">
<Hierarchy name="WELL_ID_HIR" visible="true" hasAll="true" allMemberName="AllWells" primaryKey="FILE_NO">
<Table name="mas_well_index">
</Table>
<Level name="WellIds" visible="true" column="API_NO" type="Numeric" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" visible="true" foreignKey="FILE_NO" highCardinality="false" name="CURRENT_OPTR">
<Hierarchy name="CURRENT_OPTR_HIR" visible="true" hasAll="true" allMemberName="AllWells" primaryKey="FILE_NO">
<Table name="mas_well_index">
</Table>
<Level name="CurrentOperator" visible="true" column="CURRENT_OPERATOR" type="String" internalType="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<DimensionUsage source="FILE_NUM" name="FILE_NUM" visible="true" foreignKey="FILE_NO">
</DimensionUsage>
<DimensionUsage source="Location" name="LOCATION" visible="true" foreignKey="FILE_NO" highCardinality="false">
</DimensionUsage>
<DimensionUsage source="WellIndex" name="WELL_INDEX" visible="true" foreignKey="FILE_NO" highCardinality="false">
</DimensionUsage>
<Dimension type="StandardDimension" visible="true" foreignKey="DATE_ID" highCardinality="false" name="MON_KPI_DATE">
<Hierarchy name="DATE_HIR" visible="true" hasAll="true" allMemberName="AllDateValues" primaryKey="DATE_ID">
<Table name="mas_date_temporal_dim">
</Table>
<Level name="DATE" visible="true" table="mas_date_temporal_dim" column="DATE_VALUE" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" visible="true" highCardinality="false" name="DATE_VALUE">
<Hierarchy name="DATE_VALUE_HIR" visible="true" hasAll="true" allMemberName="AllDateValues" primaryKey="FILE_NO">
<Level name="DATE" visible="true" column="DATE" type="Timestamp" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" visible="true" foreignKey="FILE_NO" highCardinality="false" name="COUNTY">
<Hierarchy name="COUNTY_HIR" visible="true" hasAll="true" allMemberName="AllCounties" primaryKey="FILE_NO">
<Table name="mas_well_spatial_dim">
</Table>
<Level name="CountyName" visible="true" column="COUNTY_NAME" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<DimensionUsage source="FIELD_NAME" name="FIELDNAME" visible="true" foreignKey="FILE_NO">
</DimensionUsage>
<Measure name="BBLSOIL_TOTAL" column="OIL_PROD_BBLS" datatype="Numeric" formatString="Standard" aggregator="sum" visible="true">
</Measure>
<Measure name="VENT_FLARE_TOTAL" column="GAS_VENT_MCF" datatype="Numeric" formatString="Standard" aggregator="sum" visible="true">
</Measure>
<Measure name="BBLSWATER_TOTAL" column="WATER_PROD_BBLS" datatype="Numeric" formatString="Standard" aggregator="sum" visible="true">
</Measure>
<Measure name="MCF_PROD_TOTAL" column="GAS_PROD_MCF" datatype="Numeric" formatString="Standard" aggregator="sum" visible="true">
</Measure>
<Measure name="AVG.DAYS" column="DAYS_IN_PROD" datatype="Numeric" formatString="###.####" aggregator="avg" visible="true">
</Measure>
</Cube>
<Cube name="SPUD_KPI_CHART" visible="true" cache="true" enabled="true">
<Table name="mas_well_spatial_dim">
</Table>
<Dimension type="StandardDimension" visible="true" foreignKey="FILE_NO" highCardinality="false" name="WELL_ID">
<Hierarchy name="WELL_ID_HIR" visible="true" hasAll="true" allMemberName="AllWellIDs" primaryKey="FILE_NO">
<Table name="mas_well_index">
</Table>
<Level name="WellIDs" visible="true" column="API_NO" type="Numeric" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<DimensionUsage source="FILE_NUM" name="FILE_NUM" visible="true" foreignKey="FILE_NO">
</DimensionUsage>
<DimensionUsage source="FIELD_NAME" name="FIELDNAME" visible="true" foreignKey="FILE_NO">
</DimensionUsage>
<Dimension type="StandardDimension" visible="true" foreignKey="FILE_NO" name="SPUDDATE">
<Hierarchy name="SPUDDATE_HIR" visible="true" hasAll="true" allMemberName="AllDates" primaryKey="FILE_NO">
<Table name="mas_well_index">
</Table>
<Level name="SPUD_DATE" visible="true" column="SPUD_DATE" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Measure name="NewWells" column="FIELD_NAME" datatype="Integer" formatString="Standard" aggregator="count" visible="true">
</Measure>
</Cube>
</Schema>
Since Mondrian is a ROLAP engine ultimately the MDX getting converted in to SQL and that SQL runs on the DB. So all RDBMS factors like number of rows, table size and indexes are matters for performance. You may enable the Mondiran SQL logs at WEB-INF/classes/log4j.xml and see the corresponding SQL. You may have to do some optimisations to DB as well.

Selecting other hierarchies in dimensions

I've googled the error message and various other keywords, but haven't
found anything similar enough to my own problem that I could apply it.
In my schema, I have the following dimension:
<Dimension name="Chip">
<Hierarchy hasAll="true" primaryKey="chip_id">
<Table name="chip"/>
<Level name="Reference Designator" column="ux" type="Integer"/>
<Level name="Pad" column="pad" type="Integer"/>
<Level name="Chip" column="chip" type="Integer"/>
</Hierarchy>
<Hierarchy name="Flash Pack Hierarchy" hasAll="true" primaryKey="chip_id">
<Table name="chip"/>
<Level name="Flash Pack" column="fp" type="Integer"/>
<Level name="Pad" column="pad" type="Integer"/>
<Level name="Chip" column="chip" type="Integer"/>
</Hierarchy>
<Hierarchy name="Bank Hierarchy" hasAll="true" primaryKey="chip_id">
<Table name="chip"/>
<Level name="Bank" column="bank" type="Integer"/>
<Level name="Chip" column="chip" type="Integer"/>
</Hierarchy>
</Dimension>
and the cube:
<Cube name="Chip Facts">
<Table name="chip_facts"/>
<DimensionUsage name="Machine" source="Machine" foreignKey="machine_id"/>
<DimensionUsage name="Card" source="Card" foreignKey="card_id"/>
<DimensionUsage name="Chip" source="Chip" foreignKey="chip_id"/>
<DimensionUsage name="Failure" source="Failure" foreignKey="failure_id"/>
</Cube>
I can query:
select
[Chip].[Reference Designator].members on columns
from [Chip Facts]
but not:
select
[Chip].[Flash Pack].members on columns
from [Chip Facts]
I get:
Caused by: mondrian.olap.MondrianException: Mondrian Error:MDX object '[Chip].[Flash Pack]' not found in cube 'Chip Facts'
How do I select the other hierarchy?
Syntax mondrian Olap cube
select {[Measures.qty1],..} on rows,
{[dimension.heirrarchy].members} on columns
from cube
Perhaps:
select [Chip].[Flash Pack Hierarchy].[Flash Pack].members on 0 from [Chip Facts]
The first hierarchy has no name, this is the default hierarchy.
The second hierarchy is [Flash Pack Hierarchy], the name is required.