Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Passing paramter to table input

  1. #1
    Join Date
    Jan 2017

    Lightbulb Passing paramter to table input

    Hi Good Morning,

    Currently i am using Pentaho 7.0 , Postgresql database. i created a parameter in transformation properties and that parameter is using in js. the out put of js is sql query, that query needs to be run in table inpu . output of js is not working in table input

    and i have uploaded my .ktr file.

    any help appreciable.
    Thanks in advance
    Attached Files Attached Files

  2. #2
    Join Date
    Jun 2012


    You must provide a SELECT statement in Table-Output. You can embed variable references like ${use} in that statement, you can even provide the whole statement in a variable, but if you don't put any text at all in that SQL text area, enabling option "Replace variables in script" will do exactly nothing.

    Also, your statement will be prepared, i.e. you can have SQL variable place holders (question marks) substituted from fields in the input stream. Make sure you provide a field for each place holder.

    Instead of generating a single empty row you can use the Get-Variables step to get your transformation started. Translating a parameter value into a SELECT statement can be done by Value-Mapper. JavaScript seems to be very popular nowadays, but if you want to master Kettle you better try not to start with writing procedural code in a scripting step. Most problems are solvable in Kettle without scripting, anyway. You'll have to adjust, though - from imperative to declarative programming.
    So long, and thanks for all the fish.

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.