Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: MQL not processing input param {}

  1. #1
    Join Date
    Jan 2007
    Posts
    19

    Default MQL not processing input param {}

    We are now planning on using metadata so that more users can use Pentaho. But I find that the MQL Relational Data Component does not processing Input parameters {} even {PREPARE} or PREPARELATER}

    SQL works fine but when you use MQL it just returns whatever you set as default value.

    And also in using Design Studio, Is there a way to set an input param w/o a default value so it will be forced on the prompt/secure filter? I think I have managed to make it work that way once but couldn't do it again.


    I need to make this work by today or else we will go back in using SQL. any help asap would be greatly appreciated.

    THANKS

  2. #2
    Join Date
    Jan 2007
    Posts
    19

    Default

    hello, very busy here i see...hehe. (just kidding)

    so, has anyone made a working replaceable parameter on a MQL query?

  3. #3
    Join Date
    Jan 2006
    Posts
    313

    Default solution found?

    I am facing the same problem.

    Dit you manage to find a solution or did you return to SQL?

  4. #4
    Join Date
    Aug 2007
    Posts
    8

    Default MQL not processing input param

    I and a potential subscriber who brought it to my attention are having the same problem. Tested on a very simple filter several times. Only the default value of the prompt works for {InputParamName}.

    Below is my .xaction file from Pentaho Design Studio. If I type in a known valid ProductCode into the box prompt, it still returns the default value.

    <?xml version="1.0" encoding="UTF-8"?>
    <action-sequence>

    <title/>

    <version>1</version>

    <logging-level>ERROR</logging-level>

    <documentation>
    <author/>
    <description>Empty blank action sequence document</description>
    <help/>
    <result-type/>
    <icon/>
    </documentation>


    <inputs>
    <ProductCodetype="string">
    <sources>
    <request>ProductCode</request>
    </sources>
    <default-value><![CDATA[S10_1949]]></default-value>

    </ProductCode>
    </inputs>


    <outputs/>


    <resources>
    <report-definition>
    <solution-file>
    <location>metatest.xml</location>
    <mime-type>text/plain</mime-type>
    </solution-file>
    </report-definition>
    </resources>


    <actions>
    <action-definition>

    <component-name>SecureFilterComponent</component-name>

    <action-type>Prompt/Secure Filter</action-type>

    <action-inputs>

    <ProductCodetype="string"/>

    </action-inputs>

    <component-definition>

    <selections>

    <ProductCodefilter="none"style="text-box"/>

    </selections>

    </component-definition>

    </action-definition>


    <action-definition>
    <component-name>MQLRelationalDataComponent</component-name>

    <action-type>MQL</action-type>

    <action-inputs>

    <ProductCodetype="string"/>

    </action-inputs>

    <action-outputs>
    <query-resulttype="result-set"mapping="query_result"/>
    </action-outputs>

    <component-definition>
    <query><![CDATA[<mql>

    <domain_type>relational</domain_type>

    <domain_id>samples</domain_id>

    <model_id>BV_INVENTORY</model_id>

    <model_name>Inventory</model_name>

    <options>

    <disable_distinct>false</disable_distinct>

    </options>

    <selections>

    <selection>

    <view>CAT_PRODUCTS</view>

    <column>BC_PRODUCTS_PRODUCTCODE</column>

    </selection>

    <selection>

    <view>CAT_INVENTORY</view>

    <column>BC_PRODUCTS_QUANTITYINSTOCK</column>

    </selection>

    </selections>

    <constraints>

    <constraint>

    <operator/>

    <condition>[CAT_PRODUCTS.BC_PRODUCTS_PRODUCTCODE] ="{ProductCode}"</condition>

    </constraint>

    </constraints>

    <orders/>
    </mql>
    ]]></query>
    </component-definition>
    </action-definition>


    <action-definition>
    <component-name>JFreeReportComponent</component-name>

    <action-type>Pentaho Report</action-type>

    <action-inputs>
    <datatype="result-set"mapping="query_result"/>
    </action-inputs>

    <action-resources>
    <report-definitiontype="resource"/>
    </action-resources>

    <action-outputs/>

    <component-definition>
    <output-type><![CDATA[html]]></output-type>
    </component-definition>
    </action-definition>


    </actions>

    </action-sequence>

  5. #5
    Join Date
    Mar 2008
    Posts
    6

    Default

    Hi

    I'm having the same problem. It seems that the MQL query is built at the init of the .xaction, instead of at the init of the MQL step, so when user is prompted for the params, the MQL query is already built with the param initial values.

    The way I've found to solve this problem is using another .xaction, that prompts for parameters and uses a "Pentaho BI Process" action to call the main .xaction with the user parameters.

    I know it´s not a smart solution, but at least it works.

    Good luck

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.