Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Getting/Setting Vars not working on slave server.

  1. #1

    Question Getting/Setting Vars not working on slave server.

    Hi Guys,

    I have a job that runs three transformations.

    The first thing the job does is to set some vars.
    The first transformation then goes an updates on of the vars
    The second transformation then uses this var to write a record into a db table.

    This works fine when executing them locally and even if I execute the job remotely but the transformations locally. However when I try and execute everything remotely, the second transformation does not pick up the change to the variable that the first transformation was supposed to set.

    Any ideas?

    Thanks
    Paul
    Attached Files Attached Files

  2. #2

    Question

    Am I correct in understanding that the intention of variables in PDI are to pass static information to Jobs and transformations before they start and are thus intended to be changed?

    So the fact that by example actually worked is an anomaly and that I should rather investigate an alternative way to accomplish passing and changing information from one transform to another?

    Thanks for the assistance.

    Regards
    Paul

  3. #3
    Join Date
    Feb 2009
    Posts
    296

    Default

    Quote Originally Posted by PollieXmas View Post
    Am I correct in understanding that the intention of variables in PDI are to pass static information to Jobs and transformations before they start and are thus intended to be changed?
    If you add a 'not' before that 'to be changed' I'd agree. The variables provide settings to the whole transformation you're running. They do not transport information from one step to next.

    So the fact that by example actually worked is an anomaly and that I should rather investigate an alternative way to accomplish passing and changing information from one transform to another?
    What exactly are you trying to accomplish?
    I've used variables to add static fields to my data. I've used variables to provide input to the transformations and I've used them to allow IT operators to change database connections and stuff like that.

    If you're trying to transport multiple rows of data from one transformation to the next you should look into 'Get rows from result' and 'Copy rows to result'.

    Does that help you?
    Fabian,
    doing ETL with his hands bound on his back

  4. #4

    Thumbs up

    Hi FabianS,

    Yes, my mistake, it should read 'not intended to be changed'.

    I simply wanted to pass the no of rows read/processed to the transformation that updates the dimension which stores the extract data.

    As you suggested, simply replacing the set variables stage in the transformation with copy rows to results and then getting it in the subsequent transformation, did the trick.

    The set variable solution was one of my first difficult things I implemented in Pentaho and when I got it to work, I did not touch it. It was before I got into the Pentho thinking. Now understanding how it is supposed to work I don't really know how I could get it to work in the first place!?

    Anyway, thanks for pointing me in the right direction.

    Regards
    Paul

  5. #5

    Question Spoke too soon.

    Hi FabianS,

    I spoke too soon...

    "copy rows to result" also only seem to work when executing locally. As soon as I ask it to execute remotely the transform that needs to "get rows from result" does not "see" any results.

    Any ideas what I'm missing?

    Thanks
    Paul
    Attached Files Attached Files

  6. #6

    Unhappy

    I cannot see that I'm doing anything wrong, but until such time that I can get this resolved, I will have to settle for using files.

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.