Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Dynamic connection (PRD-3657 and PRD-2854)

  1. #1
    Join Date
    Feb 2013
    Posts
    10

    Default Dynamic connection (PRD-3657 and PRD-2854)

    Hi,

    At the moment I have two identical Pentaho instances to provide identical reports. The only difference is the connection source. I have labeled my JNDI connection CONN on both instances and configured it differently on each instance respective PAC. Unfortunately this implementation can't scale really well since one customer will mean one pentaho instance.

    The idea here would be to have a single pentaho instance and somehow pass the JNDI/JDBC informations as parameters, this - for my needs - would scale much better.

    Based on Taqua's last comment on this ticket - PRD-2854 - passing JNDI as a parameter is not an option. However it is said :

    Given that JNDI customization can be done via scripting now
    I have been looking at the three examples on PRD-3657, they all seem to only deal with the datasource via the computeQuery function (ie. the query) but not the connection itself.

    My question is : is there anyway to dynamically select a specific connection on runtime, be it via a script (Global Scripting?) or via any other way ?

    I am using Pentaho 4.8 and Pentaho Reporting 3.9.1.

    Thank you,

  2. #2

    Default

    I am looking for the same functionality. I am currently using x-actions to achieve this since they allow a variable to be used for the JNDI name. I would prefer to get rid of my x-actions and use the reports directly.

  3. #3
    Join Date
    Feb 2013
    Posts
    10

    Default

    Quote Originally Posted by jwlewis View Post
    I am currently using x-actions to achieve this since they allow a variable to be used for the JNDI name
    Does that mean you do all your queries in the xaction and then pass the result-set over to the PRPT ?

    Because if I could dynamically define the JNDI name, even with an xaction, and keep the queries in the PRPT that will do for me. Anyway you can detail how is your current workflow working.

    Thank you,

  4. #4

    Default

    Yes, all of my queries are in the x-action and the resultsets are passed to the PRPT. That is the only way I could get a dynamic JNDI name to work.

  5. #5
    Join Date
    Feb 2013
    Posts
    10

    Default

    Having several reports that uses subreports that depends on upper-level value I don't think this pattern would work for me. Great to have another point of view for doing things though.

  6. #6

    Default

    I have a couple of reports with subreports and have the same issue. Since there are only a few I get around that by defining all of my data connections in the report, one for each of my JNDI connections. Each one of those has the query connected to it. I then use a formula in the "Query Name" property of the report that uses a parameter to decide which of my queries to use. This approach is only workable with a small number of reports or the maintenance becomes a problem. Having a dynamic datasource would be best and has supposedly been an upcoming feature for a while.

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.