Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: How to Pass variable value from sql server ?

  1. #1
    Join Date
    Dec 2017
    Posts
    2

    Default How to Pass variable value from sql server ?

    Hi all,
    I am new with pentaho, i usually work with ssis.
    now, i want to create some data with sql script on pentaho job scripting, and i want to pass that value to my my output (Write to file) on file management section.
    How can i do that?
    Attached Images Attached Images  

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

    Default

    The SQL job entry is not designed to retrieve data.

    Use a Transformation containing step Table-Input instead.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Dec 2017
    Posts
    2

    Default

    Ok i see that
    So i cant use sql job to return value
    Hmmm im a little bit confuse about variable and parameter,
    Can you give some reference ?

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

    Default

    There's a Wiki page on variables, and I recall a thread which may be helpful, too.
    A Google site search will return a non-empty result, I'm sure.
    Last but not least, there are introductory books listed in the sticky notes of this forum.

  5. #5
    Join Date
    Aug 2016
    Posts
    290

    Default

    Quote Originally Posted by duragon View Post
    Ok i see that
    So i cant use sql job to return value
    What you can do is in the "Evaluate rows number in a table ..." send the value you want from database to result rows. Result rows can later be picked up in a transformation and there you can make a variable out of it. Or simply pass it directly to a job as a variable.
    Quote Originally Posted by marabu View Post
    There's a Wiki page on variables, and I recall a thread which may be helpful, too.
    A Google site search will return a non-empty result, I'm sure.
    Last but not least, there are introductory books listed in the sticky notes of this forum.
    I tried many times to understand the difference between variable and parameter. Documentation says nothing about it.
    Last edited by Sparkles; 01-02-2018 at 03:56 AM.

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

    Default

    It's quite simple, actually. Parameters are referenced like variables, as you all might know.
    What makes them special, though?

    • Parameters are tied to the executable Kettle objects like jobs or transformations.
    • Parameters can have default values and descriptions.
    • Parameter information can be retrieved via -listparam option of pan / kitchen.
    • Parameters hide variables of the same name.

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.