Mondrian Cache Refresh Automation Mechanism in Pentaho BA Server

REFRESH MONDRIAN CACHE ON THE BA SERVER

One of the strengths of mondrian’s design is that you don’t need to do any processing to populate special data structures before you start running OLAP queries. More than a few people have observed that this makes mondrian an excellent choice for ‘real-time OLAP’ — running multi-dimensional queries on a database which is constantly changing.

The Cache stores data in byte code format in memory which helps in great performance enhancements. However, when you have a cube with (near-)real-time data, the caching can get in your way. If, for instance, your data is updated every ten minutes, but the data from an hour ago is still cached, your dashboard won’t show your new data.

There are two steps to clear the cache from the server.

Step 1: After you login to the BA Server, Go to Tools –> Refresh. There you can manually clear the cache.

Step 2: There is another way of clearing the Mondrian Cache is by using a Kettle job to clear your cache after you complete the insertion/updating of the new data. First we have to create a transformation. Inside the transformation, using the HTTP Client Step we can clear the cache through the ETL(Before that just use a Generate Rows step since the HTTP step works if there is a step before it) by passing the following URL inside the step “localhost:8080/pentaho/api/system/refresh/modrianSchemaCache” and also the user credentials. It clears the Mondrian cache every time the ETL runs on the server. It clears cache for all the cubes that are present in the server so that it is ready for the fresh data and we wont face any cache related issue which has always been a headache for real time data.

Similarly, we can also use this mechanism to clear the cache for reporting metadata and also for the repository cache. We just have to follow the same procedure in this also.

 

Regards,

Nitish Kumar Mishra

Pentaho BA Server 6.0 : How to enable Pentaho Marketplace and Pentaho CDE(CTools) in the Enterprise Edition

Enable Pentaho Marketplace and Pentaho C-Tools in Pentaho BA Server 6.0 EE

Pentaho 6.0 is the first version of the Pentaho enterprise-class server with new features to automate, manage and enhance every stage of the data pipeline. Pentaho 6.0 also introduces inline analytic model editing for sharing user-created measures and metrics in a collaborative manner.

1. Installing Pentaho Marketplace Plugin:

The Pentaho BA Server Enterprise Edition provides us all those things that are limited in Community Edition. However, we can still add the community plugins of the Pentaho server using the Marketplace in Pentaho. The Marketplace is generally disabled is Pentaho 6.0 EE server. There is no need to download to the Marketplace all over again. It’s an OSGi plugin and you already have it, but it comes disabled by default. Here are the instructions on how to enable it:

    • Edit the file
      pentaho-solutions/system/karaf/etc/org.apache.karaf.features.cfg
    • Find the key “featuresBoot” and add the feature “pentaho-marketplace”. That line will then be something like:
      featuresBoot=config,management,kar,cxf,camel,camel-blueprint,camel-stream,pentahoserver,mongolap,pentaho- metaverse,pdi-dataservice-client,pentaho-yarn-obf,pentaho-marketplace

      .

    • Restart the server and its done. The marketplace will be visible. You find it in dropdown of the Home Button. Please see the below screenshot for your reference:

Marketplace

2. Installing Pentaho CDE (Community Dashboards):

In enterprise edition, Pentaho has its own Dashboard but it has limited functionality as we cannot perform the tasks that we can do on the CDE. Therefore, developers always opt for CDE which is available to download from Pentaho Marketplace. If you go into Marketplace, follow the below steps,

      • There you would find CDF(Community Dashboard Framework), CDA(Community Data Access) and CDE(Community Dashboard Editor).
      • Download all of them.
      • Restart the server and it’s done.

Please refer to the below screenshot:

CDE

Thank you,

Nitish Kumar Mishra

Adding dollar($) sign to X-axis lables(values) for bar charts in pentaho CDE

Hi Guys,
Using below java script one can easily add ‘$’ sign to the values of X-axis for any charts in pentaho CDE.

Example:
function f(v) { return “$” + sprintf(‘%d’, v/1000) + ‘k’; }

Write the java code in “orthoAxisTickFormatter” java script wizard.

Make sure to give orthoAxisTicks as “True”
Sample output:


NOTE:
This code works with 13.06 as well with 13.09 version of pentaho CDE.

Also note that in java script if one line is not executing then the remaining lines will not execute. i.e., for instance you have 10 lines of code and 4th line is not executed then the remaining lines will not execute. Check with an alert function.

Sadakar Pochampalli
BI developer

 

Bar chart with Target lines in pentaho CDE – making bars as lines using java script in pentaho CDE

Hi guys,
This post teach you how to make bars as lines in pentaho CDE.
Source for this post is : http://jsfiddle.net/duarteleao/7maGD/
and http://type-exit.org/adventures-with-open-source-bi/2011/06/creating-dashboards-with-cde/
Scenario : Some end users wants visualization of grouped bars as lines where one of the bar is as bar and remaining bars as targeted lines on the same bar.
Properties have to give:

Plot2 : True

Find the remaining properties in below image: version of CDE is : 13.06 but will work in higher versions also.

 

In “Extension points” for the chart component you need to give 3 properties from the first link.

They are

extensionPoints: {
plot2Dot_shape: ‘bar’,
plot2Dot_shapeSize: function() {
var diam = this.chart.plotPanels.bar.barWidth ||
this.chart.options.barSizeMax;

return this.finished(diam);
},
plot2Dot_shapeAngle: function() {
return this.chart.isOrientationHorizontal() ? 0 : -Math.PI/2;
}

NOTE: Find the image for how to give the above code as properties in Extension points of chart  component.

 Sample output of the chart on dashboard after giving the above properties.

Sadakar
BI developer
(“Learning never exhausts the mind”)