Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Priming Mondrian Cache on Pentaho 5.2 using Action Sequence (xaction)

  1. #1
    Join Date
    Jun 2014
    Posts
    13

    Default Priming Mondrian Cache on Pentaho 5.2 using Action Sequence (xaction)

    Hello,

    I use Pentaho BI server 5.2 CE. My goal it to flush and prime Mondrian cache daily after running daily ETL job. I want to flush the cache because I need fresh data. I want to prime the cache because it takes too long to initialize cache (loading dashboards) after flushing (when I access dashboards for a first time).

    Flushing is done as a last step of daily ETL. No problem. (Links from CDC used to prime particular cubes.)

    For the priming I use scheduled Action sequence (xaction). The priming runs. Mondrian cache is primed. But when I access the dashboards, all the SQL queries are executed again (checked in this log mondrian_sql.log). So loading takes a same time as before (without priming).

    Datasources
    JDBC: dwh
    Analysis: OlapSchema (OlapSchema.mondrian.xml)

    I was not able to run Action Sequence when location was set this way <location>OlapSchema.mondrian.xml</location>. I thought it will refer to the analysis source defined in Pentaho "Data Sources". Wasn't working - it was trying to access the file on the same path as the xaction file is = /home/cache/OlapSchema.mondrian.xml and caused error.
    After adding the schema here /home/cache/OlapSchema.xml I was finally able to run the xaction. But I think xaction refer to the different schema file than dashboards (physical location: first one in "/home/cache/" , second one in "Data Sources"). So the xaction don't primes the same cache as dashboards uses afterwards.

    Am I missing something? Do the dashboards really use different cache than the xaction? Or is there another way to prime the Mondrian cache on Pentaho 5.2?

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <action-sequence> 
      <name>primeMondrianCache.xaxtion</name>
      <title>Prime Mondrian Cache</title>
      <version>1</version>
      <logging-level>ERROR</logging-level>
      <documentation> 
        <author>mz</author>  
        <description>Prime Mondrian Cache action</description>  
        <help/>  
        <result-type>rule</result-type>  
        <icon/> 
      </documentation>
    
      <outputs>
        <query2_result type="result-set"/>
      </outputs>
      
      <resources>
        <catalog>
            <solution-file>
                <location>OlapSchema.xml</location>
                <mime-type>text/xml</mime-type>
            </solution-file>
        </catalog>
      </resources>
      
      <actions> 
        <action-definition>
          <component-name>MDXLookupRule</component-name>
          <action-type>OLAP Connection</action-type>
          <action-resources>
            <catalog type="resource"/>
          </action-resources>
          <action-outputs>
            <prepared_component type="mdx-connection" mapping="shared_olap_connection"/>
          </action-outputs>
          <component-definition>
            <jndi><![CDATA[dwh]]></jndi>
            <location><![CDATA[mondrian]]></location>
          </component-definition>
        </action-definition>
        
        <action-definition>
          <component-name>MDXLookupRule</component-name>
          <action-type>OLAP</action-type>
          <action-inputs>
            <prepared_component type="mdx-connection" mapping="shared_olap_connection"/>
          </action-inputs>
          <action-outputs>
            <query-results type="result-set" mapping="query2_result"/>
          </action-outputs>
          <component-definition>
            <query><![CDATA[
                SELECT 
                    [Measures].[Total Shipments]
                ON 0,
                    {{[Date.Monthly].[Year].Members}, {[Date.Monthly].[Month].Members}} 
                ON 1
                FROM [Shipments]
            ]]></query>    
          </component-definition>
        </action-definition>  
      </actions> 
    </action-sequence>

  2. #2

    Default

    Was there a solution to this issue. I'm wanting to prime my cache as well and are having similar issues.

Tags for this 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
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.