KendoUI creates illegal parameter for Mondrian

5 posts, 0 answers
  1. S
    S avatar
    6 posts
    Member since:
    Dec 2016

    Posted 16 Dec 2016 Link to this post

    During testing of a system that uses Mondrian to create database cubes and KendoUI to generate dynamic MDX queries, it seems a cube using "CalculatedMember" is interpreted by KendoUI as "KPI". This is then listed as an item in "FIELDS". However, when clicking on this item, it is stuck in eternal loading while Mondrian logs an error for the query:

     

    ERROR XMLAParser:113 - Method : XMLAResponseParser.parseFaultyResponse(String xmlaResponse), Mondrian Error : The Mondrian XML: No enum constant mondrian.xmla.RowsetDefinition.MDSCHEMA_KPIS
    ERROR XmlaServlet:324 - Errors when handling XML/A message
    mondrian.xmla.XmlaException: Mondrian Error:XMLA SOAP Body processing error
    at mondrian.xmla.impl.DefaultXmlaServlet.handleSoapBody(DefaultXmlaServlet.java:511)
    at mondrian.xmla.XmlaServlet.doPost(XmlaServlet.java:318)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
    at com.utel.stinga.spa.analytics.server.XmlaRequestFilter.doFilter(XmlaRequestFilter.java:119)
    at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:499)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.IllegalArgumentException: No enum constant mondrian.xmla.RowsetDefinition.MDSCHEMA_KPIS
    at java.lang.Enum.valueOf(Enum.java:236)
    at mondrian.xmla.RowsetDefinition.valueOf(RowsetDefinition.java:54)
    at mondrian.xmla.XmlaHandler.discover(XmlaHandler.java:2857)
    at mondrian.xmla.XmlaHandler.process(XmlaHandler.java:671)
    at mondrian.xmla.impl.DefaultXmlaServlet.handleSoapBody(DefaultXmlaServlet.java:507)
    ... 20 more

     

    It seems Mondrian does not accept MDSCHEMA_KPIS. During further debugging, it seems KendoUI indeed sends this RequestType "MDSSCHEMA_KPIS":

     

    Request Payload:

    <Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"><Header/><Body><Discover xmlns="urn:schemas-microsoft-com:xml-analysis"><RequestType>MDSCHEMA_KPIS</RequestType><Restrictions><RestrictionList><CATALOG_NAME>LTE</CATALOG_NAME><CUBE_NAME>LTE_10000</CUBE_NAME></RestrictionList></Restrictions><Properties><PropertyList><Catalog>LTE</Catalog></PropertyList></Properties></Discover></Body></Envelope>

     

    Why do KendoUI interpret CalculatedMember as KPI? Why does KendoUI send request for MDSCHEMA_KPIS to Mondrian when this is not accepted?

  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3718 posts

    Posted 20 Dec 2016 Link to this post

    Hello,

    The PivotDataSource component considers every MDSCHEMA_DIMENSIONS rowset with DIMENSION_TYPE = 2 as a KPI dimension. This is how the MS SSAS works and the datasource aligns to this specification.

    If you would like to avoid this built-in behavior, then I would suggest to override either the Mondrian response to return different DIMENSION_TYPE or to override the generated MDX query:

    http://docs.telerik.com/kendo-ui/controls/data-management/pivotgrid/how-to/access-mdx-query

    Regards,
    Georgi Krustev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. S
    S avatar
    6 posts
    Member since:
    Dec 2016

    Posted 21 Dec 2016 Link to this post

    Thanks for reply.

    What is strange is that I've picked up traffic between PivotGrid and Mondrian which indicates that Field list is populated with Measures having DIMENSION_TYPE = 2.

     

    See this response from Mondrian for populating fields in PivotGrid:

          <row>
            <CATALOG_NAME>SIP</CATALOG_NAME>
            <SCHEMA_NAME>SIP</SCHEMA_NAME>
            <CUBE_NAME>SIP_300</CUBE_NAME>
            <DIMENSION_NAME>Measures</DIMENSION_NAME>
            <DIMENSION_UNIQUE_NAME>[Measures]</DIMENSION_UNIQUE_NAME>
            <DIMENSION_CAPTION>Measures</DIMENSION_CAPTION>
            <DIMENSION_ORDINAL>0</DIMENSION_ORDINAL>
            <DIMENSION_TYPE>2</DIMENSION_TYPE>
            <DIMENSION_CARDINALITY>5</DIMENSION_CARDINALITY>
            <DEFAULT_HIERARCHY>[Measures]</DEFAULT_HIERARCHY>
            <DESCRIPTION>SIP_300 Cube - Measures Dimension</DESCRIPTION>
            <IS_VIRTUAL>false</IS_VIRTUAL>
            <IS_READWRITE>false</IS_READWRITE>
            <DIMENSION_UNIQUE_SETTINGS>0</DIMENSION_UNIQUE_SETTINGS>
            <DIMENSION_IS_VISIBLE>true</DIMENSION_IS_VISIBLE>
          </row>

     

    If no CalculatedMeasures are defined in schema xml, KendoUI still recieves Measures as type 2. But if CalculatedMeasures are defined, KendoUI not only generates a Measures Field, but also an additional KPIs Field. Where does KendoUI get the information to generate KPIs?

  4. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3718 posts

    Posted 22 Dec 2016 Link to this post

    Hi,

    You are right, the [Measures] dimension actually has Dimension_Type -> 2. On the second code review, I recall that we add the [KPIs] node explicitly if we detect [Measures]. The code is something like this:

    ...
    if (dimension.type == 2) {
     found = true
    }
     
    if (found) {
      data.splice(idx + 1, 0, {
        caption: "KPIs",
        defaultHierarchy: "[KPIs]",
        name: "KPIs",
        uniqueName: "[KPIs]"
      });
    }
    ...

    This is done to perform additional request for KPIs check. Unfortunately, this will not work with Mondrian cube.

    The workaround that I can suggest is to remove the KPI tag, modifying the source of the Configurator TreeView:

    http://dojo.telerik.com/@ggkrustev/AMoCU

    If you have an idea for improvement, please post it in our UserVoice channel. This will help us a lot in gathering a community feedback for it.

    Regards,
    Georgi Krustev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  5. S
    S avatar
    6 posts
    Member since:
    Dec 2016

    Posted 22 Dec 2016 in reply to Georgi Krustev Link to this post

    Thank you, this makes sense to me!

    I will have to dig into this a bit, do some more research.

Back to Top