Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Get filenames, Env variable and Wildcard

  1. #1

    Default Get filenames, Env variable and Wildcard

    HI!

    I'm trying to generate a filename list with the Get Filenames module in Kettle 2.5.0.
    My logs repository has this structure:
    Code:
    $STAT_LOGS_PATH
     |--Folder1
     |  '--stat.ddMMyyy (many files)
     |--Folder2
     |  |--subfolder1
     |  |   '--stat.ddMMyyy (many files)
     |  `--subfolder2
     |      '--stat.ddMMyyy (many files)
     |--Folder3
        '--stat.ddMMyyy (many files)
    $STAT_LOGS_PATH is set as env variables ${STAT_LOGS_PATH} and paths from STAT_LOGS_PATH are stored in db (ex: "Folder1", "Folder2/subfolder1").
    I want to do 2 differents Kettle's job:
    The first one parse all logs from yesterday and is already done. It use javascript to generate filenames from $STAT_LOGS_PATH env variable and paths in DB. (see screenshot)


    The second one parse all logs in all folders.

    The first one is possible because there is no wildcards in filenames.
    My problem is with the second one because I can't generate filenames from Javascript and process the wildcards in Get Filenames.

    Is there another way to resolve each regular expression (one by path) as filenames? Is it possible to generate filenames with a regular expression list (a row = a regexp) ?

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

    Default

    I would write a small script/batch job to put all filenames into a file and process those then by reading the filenames from the generated. Not nice, but effective.

    Regards,
    Sven

  3. #3

    Default

    Thanks.

    Finally I manually entered each path + the wildcard stat.*.
    As it's a first time importer it doesn't matter if filelist is static.

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.