Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: how to set kettle variables values using sql script

  1. #1
    Join Date
    Oct 2015
    Posts
    9

    Default how to set kettle variables values using sql script

    Hi,

    Is there a way to set the variable values of .kettle property at run time by using Sql script ?

    Thanks

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    I'm not sure what you mean by ".kettle property", but you certainly can feed values retrieved by a Table-Input step to a Set-Variables step.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Oct 2015
    Posts
    9

    Default

    Hi ,

    I have defined a variable in kettle.properties file with null value.My intention is to populate this variable value using a SQL Query and mostly using SELECT INTO "the variable name".

    Thank you.

  4. #4
    Join Date
    Oct 2013
    Posts
    216

    Default

    You can use simple java script step , and use getVariable method to get Kettle Property variables....
    -- NITIN --

  5. #5
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    Quote Originally Posted by Puser View Post
    Hi ,

    I have defined a variable in kettle.properties file with null value.My intention is to populate this variable value using a SQL Query and mostly using SELECT INTO "the variable name".

    Thank you.
    Can I assume that you are a programmer?
    Pentaho Data Integration takes a little bit of a mind-shift for most programmers.

    For "Columns" (which I'm going to assume you mean when you say variables), you do not need to declare these in advance. You can use a table Input to bring the columns from SQL into your data stream.

    Within a transformation, variables do not change. They have a fairly specific use when abstracting transformations for multiple use.

    I'd strongly recommend reading https://www.packtpub.com/big-data-an...second-edition
    Or one of the other PDI books from https://www.packtpub.com/all/?search...%20integration when starting out.

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.