US and Worldwide: +1 (866) 660-7555
+ Reply to Thread
Results 1 to 2 of 2

Thread: MDX work on console but not in xaction

  1. #1

    Exclamation MDX work on console but not in xaction

    Hi,

    I've created a MDX query to get the name of a dimension level:

    WITH MEMBER [Measures].[geografia] as '[geografia].[All geografias].[3511111].Level.Name'
    SELECT ([Measures].[geografia]) ON COLUMNS from [Cobertura Pre Natal]
    This MDX works well when I run it in "Pentaho User Console -> Analisys View -> MDX editor", returning the name of the level.

    Now I've put the same MDX in an xaction:

    Code:
    ?xml version="1.0" encoding="UTF-8"?>
    <action-sequence> 
      <title>getNivel</title>
      <version>1</version>
      <logging-level>ERROR</logging-level>
      <documentation> 
        <author>Geotech</author>  
        <description>Coleta o nome do nível atual.</description>  
        <help/>  
        <result-type/>  
        <icon/> 
      </documentation>
    
      <inputs/>
    
      <outputs>
        <resultado type="result-set"/>
      </outputs>
    
      <resources>
        <catalog>
          <solution-file>
            <location>/gestacao.xml</location>
            <mime-type>text/plain</mime-type>
          </solution-file>
        </catalog>
      </resources>
      
      <actions> 
        <action-definition> 
          <component-name>MDXLookupRule</component-name>
          <action-type>getNivel</action-type>
          <action-inputs/>
          <action-resources>
            <catalog type="resource"/>
          </action-resources>
          <action-outputs> 
            <query-results type="result-set" mapping="resultado"/> 
          </action-outputs>
          <component-definition> 
            <jndi><![CDATA[gestacao]]></jndi>  
            <location><![CDATA[mondrian]]></location>  
            <query><![CDATA[WITH MEMBER [Measures].[geografia] as '[geografia].[All geografias].[3511111].Level.Name' 
    SELECT ([Measures].[geografia]) ON COLUMNS from [Cobertura Pre Natal]]]></query>
          </component-definition> 
        </action-definition>
     
      </actions> 
    </action-sequence>
    but when I run the xaction, this error returns:

    Failed[pt_161] Error: RuntimeContext.ERROR_0012 - [pt_33] ActionDefinition for MDXLookupRule did not execute successfully (org.pentaho.platform.engine.services.runtime.Runt imeContext)[pt_116] Debug: [pt_21] Starting execute of prototipo/dashboards/Cobertura pre-natal/getNivel.xaction (org.pentaho.platform.engine.services.solution.Sol utionEngine)
    [pt_116] Debug: [pt_30] Getting runtime context and data (org.pentaho.platform.engine.services.solution.Sol utionEngine)
    [pt_116] Debug: [pt_33] Loading action sequence definition file (org.pentaho.platform.engine.services.solution.Sol utionEngine)
    [pt_116] Debug: [pt_34] audit: instanceId=f745fdfc-0cd9-11df-addd-077c5a1fd7ac, objectId=org.pentaho.platform.engine.services.runt ime.RuntimeContext, messageType=action_sequence_start (org.pentaho.platform.engine.services.runtime.Runt imeContext)
    [pt_14] Error: MDXBaseComponent.ERROR_0006 - [pt_38] Could not execute getNivel.xaction - java.lang.ArrayIndexOutOfBoundsException: 1 (org.pentaho.platform.plugin.action.mdx.MDXLookupR ule)
    [pt_161] Error: RuntimeContext.ERROR_0012 - [pt_33] ActionDefinition for MDXLookupRule did not execute successfully (org.pentaho.platform.engine.services.runtime.Runt imeContext)
    [pt_161] Error: SolutionEngine.ERROR_0007 - [pt_27] Action sequence execution failed (org.pentaho.platform.engine.services.solution.Sol utionEngine)

    Server Version: Pentaho Platform Engine Core 3.5.0.stable.39705
    Why the hell this MDX works in a place and don't work in another??
    Isn't Mondrian that executes the query of an xaction?

  2. #2

    Default Solved

    For a reason that I don't know, I need to return something in rows when I call an MDX within xaction.

    So my sentence should be:

    SELECT [something] ON COLUMNS,
    [other thing] ON ROWS
    FROM [some cube]

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts