US and Worldwide: +1 (866) 660-7555
+ Reply to Thread
Results 1 to 8 of 8

Thread: Prompting User for Input

  1. #1
    Join Date
    May 2008
    Posts
    25

    Default Prompting User for Input

    Hello All,

    I discovered Pentaho Kettle just this last weekend and have already succeeded in transforming data between the application I implement and support and a couple of different payroll applications. It took a lot of trial, error, and a lot of late nights but I figured it out...PHEW!! Awesome product!

    I am not a seasoned veteran like a lot of folks on this forum. So, I ask for your patience.

    My question: Is there built in functionality to prompt a user for input. I need to use this information to place in a header of a flat ascii file. I need to prompt for three pieces of information - day number, paycycle, and accounting period. I can then build a string of data with this to place at the header of the file at the end of the transformation.

    Thanks,

    Lloyd
    Application Implementation Specialist

  2. #2

    Default

    In a nutshell, nope Although if you end up running a full blown server you can pass variable from an xaction that way I believe, or you can pass args and stuff from the command line, so I have heard

    Tom
    This is a signature.... everyone gets it.

    Join the Unofficial Pentaho IRC channel on freenode.
    Server: chat.freenode.net Channel: ##pentaho

    Please try and make an effort and search the wiki and forums before posting!
    Checkout the PAT Analysis Tool, the future of Open Source Interactive OLAP(http://code.google.com/p/pentahoanalysistool/)


  3. #3
    Join Date
    Jan 2007
    Posts
    945

    Default

    To paraphrase Tom, Kettle can accept user input through arguments (usually passed in from the command line) through variables (usually set by a transformation or in the kettle.properties file or set as an environment variable in the JVM) or by reading some text file or database record.

    As far as prompting the user for input, that is not something that is currently built in to Kettle.

    It is built in to the xaction system of the Pentaho bi-server so you could prompt the user on a webpage for parameters and then invoke Kettle passing in those parameters as arguments.

    Without the bi-server, the easiest thing to do would be to write a simple program or script that prompted the user for the information then executed Kettle and passed those parameters in. Depending on your familiarity, there are several technologies you could choose from. Bash, a variety of Window scripting or programming languages, or Java.

    If you really wanted to "keep it all in Kettle", you could write some JavaScript that would prompt the user (maybe by interfacing with Java to create some sort of SWT or Swing dialog) or if that didn't work out you could always write a plugin that would prompt them and pass the information on.

  4. #4
    Join Date
    Nov 1999
    Posts
    7,251

    Default

    Well actually, we don't advice you do so, but there is some prototyping code in the following sample:

    Code:
    samples/transformations/JavaScript - dialog.ktr
    It wouldn't work in pan/kitchen without putting the SWT libs in the classpath, but you can try it in Spoon.
    Matt Casters, Chief Data Integration
    Pentaho, Open Source Business Intelligence
    http://www.pentaho.org -- mcasters@pentaho.org

    Author of the upcoming book Pentaho Kettle Solutions by Wiley. Release date: mid-September 2010.

    Join us on IRC server Freenode.net, channel ##pentaho

  5. #5
    Join Date
    May 2008
    Posts
    25

    Default

    I tried the Javascript - dialog.ktr sample and it seems to work. I am going to play around with it some more. Thanks much, Matt!

  6. #6
    Join Date
    Jan 2007
    Posts
    461

    Default

    Hi Daniel...

    I have an xaction that prompts the user for a parameter, which I need to get into a kettle transformation, which will then provide an answer (resultset) to the xaction to build a report.

    Please advise what "step" in the kettle transformation should I use to receive the parameter from the xaction?

    Many thanks, DMurray3

  7. #7

    Default

    [quote=DMurray3;200291]
    Please advise what "step" in the kettle transformation should I use to receive the parameter from the xaction?
    /quote]
    I may be way off the mark but aren't they passed as run time variables?
    This is a signature.... everyone gets it.

    Join the Unofficial Pentaho IRC channel on freenode.
    Server: chat.freenode.net Channel: ##pentaho

    Please try and make an effort and search the wiki and forums before posting!
    Checkout the PAT Analysis Tool, the future of Open Source Interactive OLAP(http://code.google.com/p/pentahoanalysistool/)


  8. #8
    Join Date
    Jan 2007
    Posts
    461

    Default

    Thanks for your interest...Bugg_tb... I solved my problem... I included a GetSytemInfo step in the transform and used the same variable name as an "input" in the xaction. Everything works perfectly...

    Regards, DMurray3

+ Reply to 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