Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This article describes how to prime specific Mondrian queries in the Pentaho BI Server, as well as demonstrating how to use Mondrian's Cache Control API within the Pentaho BI Server.

Priming Mondrian Cache

Let's say you update your data warehouse on a nightly basis, and know some of the MDX queries that folks use during the day for dashboards, reporting and analysis.  You can pre-populate Mondrian's cache before standard usage of the system to get a leg up on performance.  Here's how you do it.

Step 1: Create an Action Sequence

Start off by creating a basic action sequence.  You could do this in Design Studio or via an XML editor.  Here an empty xaction we can build on.  Place this in the solution repository:

<?xml version="1.0" encoding="UTF-8"?>
<action-sequence>
  <title>Prime Mondrian Cache</title>
  <version>1</version>
  <logging-level>ERROR</logging-level>
  <documentation>
    <author/>
    <description>An example of priming Mondrian Cache</description>
    <help/>
    <result-type/>
    <icon/>
  </documentation>
  <inputs/>
  <outputs>
  </outputs>
  <resources>
  </resources>
  <actions>
  </actions>
</action-sequence>

Step 2: Define a Mondrian Connection

This is a very important step.  There are many ways to define a Mondrian Connection, and there are many properties you can set.  It's very important that the Reporting, Analysis, and Dashboards you use along with this action sequence share the identical Mondrian Connection.  In this example, we'll use the already defined connection information in pentaho-solutions/system/olap/datasources.xml for SteelWheelsSales.

First, you need to add a resource to reference the Mondrian catalog:

  <resources>
    <catalog>
      <url>
        <location>solution:steel-wheels/analysis/steelwheels.mondrian.xml</location>
        <mime-type>text/xml</mime-type>
      </url>
    </catalog>
  </resources>
  • No labels