Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: xaction result set as datasource for the table component

  1. #1
    Join Date
    Jun 2013
    Posts
    17

    Default xaction result set as datasource for the table component

    Hi,

    I try to use a xaction result set as datasource for a table component. So far it doesn't work. For testing I have used a JNDI query in a xaction. The content of "query_result" is directly my xaction output parameter.
    Do I have to modify the output format?

    Thanks is advance ...
    Sven

  2. #2
    Join Date
    Nov 2011
    Posts
    1,229

    Default

    Have you checked the table component reference in Plugin Samples ?
    The example there also uses an xaction to get its data.
    Pedro Vale
    --
    CTools Product Development
    http://www.webdetails.pt

  3. #3
    Join Date
    Jun 2013
    Posts
    17

    Default

    Hi Pedro

    I cannot find the table component reference in Plugin Samples! I'm using CDE as Editor.

    Sven

  4. #4
    Join Date
    Nov 2011
    Posts
    1,229

    Default

    plugin Samples / CDF / Component Reference / Table Component
    Pedro Vale
    --
    CTools Product Development
    http://www.webdetails.pt

  5. #5
    Join Date
    Jun 2013
    Posts
    17

    Default

    Hi Pedro,

    I can only find the following samle:

    biserver-ce-4.8.0-stable \ biserver-ce \ pentaho-solutions \ plugin-samples \ pentaho-cdf \ 30-documentation \ 30-component_reference \ 10-core \ 64-TableComponent

    But, there is no xaction referenced.

    In the moment I try to use the following xaction:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <action-sequence> 
      <title>Create_Table</title>
      <version>1</version>
      <logging-level>DEBUG</logging-level>
      <documentation> 
        <author>Sven Dorf</author>  
        <description/>  
        <help/>  
        <result-type/>  
        <icon/> 
      </documentation>
    
    
      <inputs> 
        <p_project type="string"> 
          <sources> 
            <request>p_project</request> 
          </sources>  
          <default-value><![CDATA[Projekt1]]></default-value> 
        </p_project> 
      </inputs>
    
    
      <outputs> 
        <query_result type="result-set"> 
          <destinations/> 
        </query_result> 
      </outputs>
    
    
      <resources/>
      
      <actions> 
        <action-definition> 
          <component-name>SQLLookupRule</component-name>
          <action-type>Meta</action-type>
          <action-inputs> 
            <p_project type="string"/> 
          </action-inputs>
          <action-outputs> 
            <query-result type="result-set" mapping="query_result"/> 
          </action-outputs>
          <component-definition> 
            <live><![CDATA[true]]></live>  
            <query><![CDATA[select * from {p_project}]]></query>  
            <jndi><![CDATA[SQS_HSQL_META]]></jndi>
          </component-definition> 
        </action-definition>
     
      </actions> 
    </action-sequence>
    When I run this xaction from inside the Design Studio, then it works.

    When I try to include this xaction in CDE as datasource (Xaction resultset) for a table component, then I get the following error:

    Code:
    13:29:16,436 ERROR [SQLLookupRule] Error end:
    13:29:16,437 ERROR [SQLLookupRule] 1d27f001-eed4-11e2-8aa1-f546ce44b907:COMPONENT:context-20875199-1374060556418:jtable.xactionSQLBaseComponent.ERROR_0007 - Ung³ltige Verbindung zur Datenquelle.
    13:29:16,439 ERROR [SolutionEngine] 1d27f001-eed4-11e2-8aa1-f546ce44b907:SOLUTION-ENGINE:jtable.xaction: Action Sequence execution failed, see details below
    | Error Time: Mittwoch, 17. Juli 2013 13:29 Uhr MESZ
    | Session ID: sven
    | Instance Id: 1d27f001-eed4-11e2-8aa1-f546ce44b907
    | Action Sequence: jtable.xaction
    | Execution Stack:
    EXECUTING ACTION: Relational (SQLLookupRule)
            in IF STATEMENT: QUERY_TYPE == "sql"
    | Action Class: SQLLookupRule
    | Action Desc: Relational
    | Loop Index (1-based): 0
    I have to choose this solution because I can not define a parameter for a FROM statement to CDA. Have a look at http://forums.pentaho.com/showthread...able-selection

    Thanks in advance
    Sven

  6. #6
    Join Date
    Nov 2011
    Posts
    1,229

    Default

    you're right. The reference does not use a xaction, sorry.

    So, from the stack trace, the problem seems to be in the xaction itself, when it tries to access the database. Is the

    SQS_HSQL_META datasource configured in the BI server correctly?
    Pedro Vale
    --
    CTools Product Development
    http://www.webdetails.pt

  7. #7
    Join Date
    Jun 2013
    Posts
    17

    Default

    The SQS_HSQL_META datasource is working. I'm using this datasource in another xaction to create a Pie-Chart also.
    Can it be, that the xaction needs more parameter? When I check the jtable.xaction then I can see a lot of requested parameters.
    Do you have a small example of an xaction which will use as table component datasource?

    Thanks is advance ...

    Sven

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.