Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Weekly CSV Download via FTP

  1. #1
    Join Date
    Feb 2010
    Posts
    19

    Default Weekly CSV Download via FTP

    Hi,

    I've got a simple problem here but I don't know how to fix. (Sorry, newbie here)

    So... I'm trying to do this:

    Every week I have a CSV file to download via FTP named "YYYY-MM-DD_FileName.ZIP.
    I have to do this:
    - Download the file;
    - Unzip it;
    - Execute a Job.

    I've done this simple job:
    Name:  JOB.JPG
Views: 51
Size:  8.8 KB

    There is only one problem: How do I "guess" the "YYYY-MM-DD" file's name part?

    It's already working, but I have to complete the file's name manualy.
    I'd like a smarter solution...
    Name:  GetFiles.jpg
Views: 49
Size:  22.1 KB

    Thanks!

  2. #2
    Join Date
    Sep 2007
    Posts
    834

    Default

    What are you currently doing in the Get Date transformation?
    You shoud set a variable with the date in the required format
    for example ${DATEVAR}

    Then, as file name (in the ftp job entry) use the variable, i.e.
    ${DATEVAR}_myfile.zip

  3. #3
    Join Date
    Feb 2010
    Posts
    19

    Default

    In the Get Date transformation I was trying to calculate the YYYY-MM-dd and set it into a var to use on "download file" step, but didn't work. (or I didn't do right)

    Your suggest is very nice, but I'd have to set manualy a value on the ${DATEVAR} or it could be automatic?

    Thanks!

  4. #4
    Join Date
    Sep 2007
    Posts
    834

    Default

    automatic.
    see the attachment,
    Attached Files Attached Files

  5. #5
    Join Date
    Feb 2010
    Posts
    19

    Default

    Thanks Maria Roldan!
    It's working!

    And congrats for your book. I've just bought a Pentaho book and probably yours will be the next!

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.