Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: NEWBIE: Transform rename output filename

  1. #1
    Join Date
    Dec 2013
    Posts
    2

    Post NEWBIE: Transform rename output filename

    Apologies up front if this is a redundant question. I'm trying to setup a text file output that names the file with the current date in the name. For example, FILENAME.20131202.txt.

    I can't find where I can put in a variable that would grab either the current date, in the appropriate format, or how I could have a variable provide that information.

    Any help is much appreciated.

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

    Default

    So you can't live with option "Include date in filename"?
    You could use "Accept filename from a field" - Get System Info will fetch the current date for you.
    Or you could build a dynamic filename in a separate transformation to store it in a variable.

    Or you could accept the current date from a command line parameter - my choice.
    Define the parameter in the transformation settings, e.g. TODAY.
    Use FILENAME.${TODAY} in your Text File Output filename.
    Provide 20131202 as parameter value, when starting the transformation.
    So long, and thanks for all the fish.

  3. #3
    Join Date
    Dec 2013
    Posts
    2

    Smile

    Quote Originally Posted by marabu View Post
    So you can't live with option "Include date in filename"?
    You could use "Accept filename from a field" - Get System Info will fetch the current date for you.
    Or you could build a dynamic filename in a separate transformation to store it in a variable.

    Or you could accept the current date from a command line parameter - my choice.
    Define the parameter in the transformation settings, e.g. TODAY.
    Use FILENAME.${TODAY} in your Text File Output filename.
    Provide 20131202 as parameter value, when starting the transformation.
    Thank you for your reply. I was doing something wrong and couldn't get the "Include date in filename" to work correctly. After trying it again, it seems to be doing exactly what I asked for. Ask and you shall receive. Again thank you.

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.