Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: How to create dynamic variable current moth for use in filename output?

  1. #1
    Join Date
    Jun 2016
    Posts
    181

    Default How to create dynamic variable current moth for use in filename output?

    I need dynamic directory name where I put the result of transformation.
    For instance "c:\temp\01.xls" where "01" is the current month.

    How can I achieve that?

    The only way I can imagine is to to use Modified Java Script Values.
    I tried "Set variables" but this gives no value - only some static variables I can create there....

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

    Default

    Please take the time to learn about jobs.
    We've gone of this in a few of your threads.

    Due to the parallel nature of transformation initialization, variables cannot be set and used in the same transformation.
    However, if you set a variable in a transformation which is inside a job, you can use it in the following transformation in the job.

    I strongly recommend that you read (cover to cover) https://www.packtpub.com/big-data-an...second-edition
    Also take the time to walk through the samples in your %PDI_INSTALL%/samples directory

  3. #3
    Join Date
    Jun 2016
    Posts
    181

    Default

    Thanks Gutlez. Believe me, I was trying different options, also with jobs, before I posted this. Was not working.
    However I succeeded. Here is working demo (maybe someone will need it).

    PS
    Thanks for book recomendation - I will purchase one.
    Attached Files Attached Files

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

    Default

    Quote Originally Posted by Gosforth View Post
    Thanks Gutlez.
    Sorry -- sometimes I come across as a bit of a jerk on here... I don't mean to be being a jerk - I want you to learn so that you can support newbies too!

  5. #5
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    So jobs didn't work, huh?
    Attached Files Attached Files
    So long, and thanks for all the fish.

  6. #6
    Join Date
    Jun 2016
    Posts
    181

    Default

    It did not hurt ;-)
    I really appreciate help I'm receiving - u do amazing job. I really undersand your point of view - the goal is not to teach how to fish not to give fish :-)

    Quote Originally Posted by gutlez View Post
    Sorry -- sometimes I come across as a bit of a jerk on here... I don't mean to be being a jerk - I want you to learn so that you can support newbies too!

  7. #7
    Join Date
    Jun 2016
    Posts
    181

    Default

    Quote Originally Posted by marabu View Post
    So jobs didn't work, huh?
    Mine works :-)
    But I will study as well yours - thanks

    ..yours looks better
    Last edited by Gosforth; 11-04-2017 at 06:16 AM.

Tags for this Thread

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.