Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Get transformation or job version

  1. #1
    Join Date
    Dec 2005
    Posts
    531

    Default Get transformation or job version

    Hi all,

    In the transformation and job settings you can fill in a version field.

    It is possible to get the version of the parent job via a variable?

    Best regards,
    Ingo

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    Not that I'm aware of for the moment.

    What use for it do you have in mind?

    Regards,
    Sven

  3. #3
    Join Date
    Dec 2005
    Posts
    531

    Default

    Hi Sven,

    I'm supposed to document the version of the parent job when running a transform. Think along the lines of accountability and auditing. The version numbers get set when deploying a job to production and the old versions are kept. Later on you can always check what "version" of a job actually handled the load of some data.

    I found a solution, parsing the kjb file, which works ok, but I was wondering if there is a more elegant way to handle this.

    Regards,
    Ingo

  4. #4
    Join Date
    May 2006
    Posts
    4,882

    Default

    Maybe raise a JIRA to put the version in the log file e.g. at startup.

    Regards,
    Sven

  5. #5
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    You have access to the parent job in a Java Script job entry:

    http://wiki.pentaho.com/display/EAI/...ript+job+entry

    As such, grabbing the parent job version could be done by setting a variable:

    Code:
    var jobversion = parent_job.getJobMeta().getJobversion();
    parent_job.setVariable("JOB_VERSION", jobversion);
    You can then grab a hold of that JOB_VERSION variable in sub-jobs and transformations.

    HTH,

    Matt

  6. #6
    Join Date
    Dec 2005
    Posts
    531

    Default

    Hi Matt,

    Thanks, that looks like a more elegant way then to parse the kjb-file. ;-)

    @Sven: Thanks for your input as well. For the moment, Ii think Matt's solution should be ok for me and I will not file a JIRA case.

    Regards,
    Ingo

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.