Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Multiple variables in table input

  1. #1

    Default Multiple variables in table input

    Hi,

    Am I able to do this ?

    Code:
    SELECT 
    token as UserTokenID, 
    startdate as StartDateID, 
    submitdate as SubmitDateID, 
    ${CODE} as Answer
    FROM survey_${SURVEYID}
    Regards,

    --jr

  2. #2
    Join Date
    Apr 2008
    Posts
    4,683

    Default

    As long as the variables are defined *BEFORE* the beginning of the execution of the transformation containing the Table Input, then Yes.

  3. #3
    Join Date
    Feb 2011
    Posts
    840

    Default

    Quote Originally Posted by joaoromao View Post
    Hi,

    Am I able to do this ?

    Code:
    SELECT 
    token as UserTokenID, 
    startdate as StartDateID, 
    submitdate as SubmitDateID, 
    ${CODE} as Answer
    FROM survey_${SURVEYID}
    Regards,

    --jr
    Hello, "xará"! You must define ${CODE} and ${SURVEYID} as parameters on the job (double click on the job on the "View" tab to open the Job properties screen, then go to the "Parameters" - or "Parâmetros", dunno if your PDI shows a couple words translated like mine), and must NOT FORGET to check the "Replace variables in script" option on the Table input edit screen.

    -=edit=-
    oh yeah, like @gutlez said, when you execute the job, don't forget to fill in the appropriate values on the execution screen, in "Parameters"/"Parâmetros"!

  4. #4
    Join Date
    Apr 2008
    Posts
    4,683

    Default

    They don't have to be defined as Parameters - The only time that you have to define a parameter is if you want to be able to specify the values as parameters (eg on the command line or Run window)

    It depends on how this is planned on being used - Variables may work sufficiently.
    Last edited by gutlez; 03-01-2011 at 03:53 PM.

  5. #5
    Join Date
    Sep 2009
    Posts
    810

    Default

    Hi joaoromao,

    Id you'd like some samples on this, this post has example transformations regarding that:
    http://type-exit.org/adventures-with...-a-k-a-kettle/

    Cheers

    Slawo

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.