Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Calling SQL query from button component

  1. #1
    Join Date
    Jul 2013

    Default Calling SQL query from button component

    Hi !

    I would like to insert a line in DB when I click on a button component.
    I created a SQL query over Jndi that does the insert with the required parameters in the Data Sources tab,
    but I wonder if it's possible to call that query from the button function.

    Thanks !

    PS : I can also include the query directly inside the function if needed !

  2. #2


    I think you can create a parameter which will change when you click on the button component.
    Add this parameter to the datasource's listenner.

    The request will be executer each time you click on this button.

  3. #3
    Join Date
    Jul 2013


    Thanks for the information !
    Do you know what kind of component I should use as the datasource's listener ? I tried with the QueryComponent, but it doesn't seem to work.
    And it does not come from the database, I checked and I have all rights on it.

    Edit : it's working ! I used a stored procedure and called it in the SQL datasource ("call proc(arg1,arg2,..)") and it's fine now.
    But for anyone attempting this be careful about the types you want in your proc !
    Last edited by rempan; 08-06-2013 at 03:18 AM.

  4. #4
    Join Date
    Feb 2014


    Can you elaborate on this a bit more. I have a text area input component, whose input is I want to save in a kettle transformation.
    I want to call that kettle datasource on a button click. so that all the data from the text area can be sent.
    How do you add listener to datasource? Because I cannot ind the option for listener in the kettle datasource, it just has parameters and variables.

  5. #5
    Join Date
    Jan 2014


    Hi all,

    In recent CDE+CDF versions, the button component support calling a datasource when clicked. Just open "Advanced Properties" in CDE.
    If you are trying to send the contents of a text input to the server, associate a parameter to the text input component, say "textParameter", and then configure a datasource for the button component that uses textParameter as a parameter.

  6. #6
    Join Date
    Oct 2014


    Rempan ... hello .. you could insert a row line in your database? Is there any solution for this .. let me know if there ok !.

    thank you

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.