Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Dynamic Schema Processor with Pentaho-Suite 5.3

  1. #1
    Join Date
    May 2015

    Question Dynamic Schema Processor with Pentaho-Suite 5.3


    I'm trying to use Mondrian with Dynamic Schema Processor within Pentaho-Suite CE. I have a very simple cube where the cube- and schema-names have placeholders. It's only a test, so I want to change the placeholder to one fix String.
    <Schema name="##NAME##">
    <Dimension type="StandardDimension" visible="true" highCardinality="false" name="Summary" caption="Summary">
    <Hierarchy visible="true" hasAll="true" allMemberName="All summaries" primaryKey="DIM_SUMMARY_KEY">
    <Table name="DIM_SUMMARY" schema="ACCOUNT_##NAME##">

    My DSP looks like that:
    package dsp.ownimport;
    import java.util.regex.PatternSyntaxException;
    import mondrian.i18n.LocalizingDynamicSchemaProcessor;
    import mondrian.olap.Util;

    public class DSPtest extends
    LocalizingDynamicSchemaProcessor {
    private static final String PLACEHOLDER = "##NAME##";
    private static final String OVERWRITER = "MIKE";

    public String filter (String schemaUrl, Util.PropertyList connectInfo, InputStream stream) throws Exception {
    String schema = super.filter(schemaUrl, connectInfo, stream);
    try {
    schema = schema.replaceAll(PLACEHOLDER, OVERWRITER);
    } catch (PatternSyntaxException pse) {
    return schema;
    return schema;
    I exported this class as jar-file by Eclipse and copied it to [..]/biserver-ce/tomcat/webapps/pentaho/WEB-INF/lib.
    At Pentaho BI-Suite I went to [Manage Data Sources] > [Gear-symbol] > [Import Analysis]. I opened the xml-file (where a short extract u can see above) as "Mondrian File" and selected "Manually enter data source parameter values". I set the following key->value pairs:
    Key Value
    DataSource dbConnection
    UseContentChecksum true
    DynamicSchemaProcessor dsp.own.DSPtest
    EnableXmla false

    At this moment I can save this and the Mondrian-File is displayed as ##NAME##. If I restart Pentaho bi-server and go to [Manage Data Sources] again, the name is displayed as MIKE. I think the DSP-jar was loaded and works. At this time I can not do any changes to this settings, because I'm not able to save it. The "Mondrian File" is displayed as MIKE.mondrian.xml and I think this is the reason for it.

    If I go to [Create New] > [JPivot View] there is schema MIKE displayed. I choose my Cube (they are all displayed with MIKE instead of ##NAME## in their names) and press ok.
    An error occurred while rendering Pivot.jsp. Please see the log for details.

    At [..]/biserver-ce/tomcat/logs/pentaho.log I found:
    2015-05-15 17:31:13,022 ERROR [org.pentaho.platform.repository2.unified.jcr.JcrAclNodeHelper] Error retrieving ACL Node java.lang.NullPointerException
    at org.pentaho.platform.repository2.unified.jcr.JcrAclNodeHelper$
    at org.pentaho.platform.repository2.unified.jcr.JcrAclNodeHelper$
    at org.pentaho.platform.repository2.unified.jcr.JcrAclNodeHelper.getAclNode(
    at org.pentaho.platform.repository2.unified.jcr.JcrAclNodeHelper.hasAclNode(
    at org.pentaho.platform.repository2.unified.jcr.JcrAclNodeHelper.canAccess(
    at org.pentaho.platform.plugin.action.mondrian.catalog.MondrianCatalogHelper.hasAccess(
    at org.pentaho.platform.plugin.action.mondrian.catalog.MondrianCatalogHelper.getCatalog(
    at org.pentaho.platform.plugin.action.mondrian.mapper.MondrianAbstractPlatformUserRoleMapper.getMondrianRolesFromCatalog(
    at org.pentaho.platform.plugin.action.mondrian.mapper.MondrianAbstractPlatformUserRoleMapper.mapConnectionRoles(
    at org.pentaho.platform.plugin.action.mondrian.MondrianModelComponent.getInitialQuery(
    at org.pentaho.platform.plugin.action.mondrian.MondrianModelComponent.getInitialQuery(
    at org.pentaho.jpivot.PivotViewComponent.executeAction(
    2015-05-15 17:31:13,428 ERROR [com.tonbeller.jpivot.mondrian.MondrianModel] Mondrian Error:MDX cube 'MIKE_SUMCUBE' not found
    2015-05-15 17:31:13,428 ERROR [com.tonbeller.jpivot.tags.OlapModelProxy]
    com.tonbeller.jpivot.olap.model.OlapException: Mondrian Error:MDX cube 'MIKE_SUMCUBE' not found
    at com.tonbeller.jpivot.mondrian.MondrianModel.initialize(
    at com.tonbeller.jpivot.olap.model.OlapModelDecorator.initialize(
    at com.tonbeller.jpivot.tags.OlapModelProxy$MyState.initialize(
    If I play "manually DSP" and open the xml by a text-editor, replace ##NAME## by MIKE, load it in Pentaho-BI-Server and open the same cube then it works very fine. And this is nothing else as the DSP should do.

    I hope anyone can give me a hint where my mistake is and how I'm able to use DSP for my application.

  2. #2


    Prior to the first release of Pentho 5, the Pivot viewer (found in /pentaho/jsp/Pivot.jsp) had hardcoded the DynamicSchemaProcessor as "mondrian.i18n.LocalizingDynamicSchemaProcessor". So, in that days, if you wanted a DSP working with JPivot, you had to edit your Pivot.jsp
    When porting this jsp into a native pentaho plugin, I believe that they retain that piece of code, but now is more hard to fix it.
    I'm trying to figure how Saiku solved this issue, because they already did.
    You can also contact, because they have some alternative.

  3. #3
    Join Date
    Aug 2013


    I felt in a similar problem.
    Did you find a solution?



  4. #4


    It is already solved for STPivot (a brand of JPivot developed by Stratebi).
    Applying the same patch for the Pivot plugin is also posible, but I recommend to get in touch with and ask for a copy of STPivot.

  5. #5
    Join Date
    Jun 2015


    I'm using dynamic schema processor with pentaho 5.3. Everything works fine... but one thing:
    It is expected that the schema should be built once by each user login but I wonder why the schema is rebuilt before running each mdx query!!! and due to this issue the performance is badly affected!
    Any advice please?!

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.