Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: downloading files with date range

  1. #1
    Join Date
    May 2013
    Posts
    5

    Default downloading files with date range

    I am trying to download files from a website. Part of the file name is date and I want to download all the files with certain date range. Currently I put all the dates in a grid manually. Is there any way to download files automatically by just inputing start date and stop date? Help please!

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

    Default

    It's not difficult to generate a range of dates using steps "Generate Rows", "Add Sequence", and "Calculator".
    So long, and thanks for all the fish.

  3. #3
    Join Date
    May 2013
    Posts
    5

    Default

    test.ktr Thanks for your response.
    Here is my test transformation. In the java script I tried to generate the URLs. But it just output one URL in stead of 3 with dates from 20130518 to 20130520

  4. #4
    Join Date
    Sep 2011
    Posts
    26

    Default

    june, you have to understand PDI as a row processor. I can understand what you are trying to do in the javascript step but this step is not going to create more rows than the ones that come in. If you have one row entering the java script step, only one row will output.

    Instead of a Data Grid, use a Generate Rows step with the start_date, then add a Sequence step to generate natural numbers and with a calculator step use the "Date A + B Days" to generate on date per row.

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

    Default

    Quote Originally Posted by june View Post
    Here is my test transformation.
    And here is a corrected version.
    Attached Files Attached Files
    So long, and thanks for all the fish.

  6. #6
    Join Date
    May 2013
    Posts
    5

    Default

    It works. Really appreciate your help.

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.