Hitachi Vantara Pentaho Community Forums
Results 1 to 1 of 1

Thread: Usage of setvariable step in mapping transformation

  1. #1
    Join Date
    Sep 2016

    Default Usage of setvariable step in mapping transformation

    Existing Approach:
    I have some common logic where I need to call at the beginning of each job . Common logic is it will connect to database and call some procedure and returns a number, using a setvariable step will set this value to a pentaho variable which I will use further
    Suppose I have four job J1,J2,J3,J4, and I implemented the same logic(common logic) in all the four jobs by using four different transformations t1,t2,t3,t4

    j1------------------ call t1 transformation
    t1 called stored procedure using x from job j1
    stored procedure returned 1
    set pentaho variable to PV=1-------à j1 make use PV further

    j2------------------ call t2 transformation
    t2 called stored procedure using y from job j2
    stored procedure returned 2
    set pentaho variable PV=2-------à j2 make use PV further

    j3----------------- call t3 transformation
    t3 called stored procedure using z from job j3
    stored procedure returned 3
    set pentaho variable PV=3-------à j3 make use PV further

    New approach:
    My intention is to use mapping transformation to implement the common logic and call the mapping transformation in all the jobs .
    Suppose I have four job J1,J2,J3,J4, implement the common logic in transformation t1 and make use of t1 transformation in all the jobs.

    Here one thing I am not clear is , in the mapping transformation I am using setvariable step to set the value returned from stored procedure to a pentaho variable. Does this causes any jumbling of return values when returning value back to calling jobs.

    Like explained above j1 should receive value of 1 and j2 should receive value of 2.

    There shouldn't be any jumbling here like j1 receiving value of 2 and j2 receiving value of 1

    Last edited by sboddu9; 12-29-2016 at 03:07 PM.

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.