Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Variable creation and usage

  1. #1

    Default Variable creation and usage


    HI,

    I want to create a variable and use it in the same transformation. How can i do that?


    As of now, i am using a formula step to calculate an expression. But it is creating a new column. But i dont want a new column to be created (As per the requirement, no column replacement can be done inside the formula step). So i am trying to create a variable. Please help.

  2. #2
    Join Date
    Feb 2011
    Posts
    12

    Default

    Hi Ponb,

    this is a quick advice for friday morning.

    have you tried to use "set variables" step (Job category)?

    Maybe you can create a job with two transformations: first transformation for creating the variable with corresponding value and second transformation that use it.

  3. #3
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    You can change a colum using a java expression.
    You do not need to create a new colum, simply update the existing one.

    The step needed is Modified Java Expression.

    Mick

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

    Default

    Quote Originally Posted by Ponb View Post

    I want to create a variable and use it in the same transformation. How can i do that?
    Short Answer: No, you can't.
    Longer Answer: Use your formula exactly as you planned, creating the new column. Then use a select values step to drop the old column, and rename the new column to the same as the old one.

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.