Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: read files from configured path

  1. #1
    Join Date
    Dec 2016
    Posts
    17

    Default read files from configured path

    Hello,

    I have some directories, could be one or many.
    each directory path is configure in one file like

    Country|Path
    xyz|x/y/z/job
    abc|a/b/job
    def|d/job

    I want to read this file once, get the path and read all files which are like *.csv
    If I check accept file name from previous step it will not allow the wildcard, if it allow could you tell me how ?
    could you let me know how I can achieve it in the same transformation ?

  2. #2
    Join Date
    Nov 2009
    Posts
    688

    Default

    Get a list of all Path and another column with a regex .*\.csv$
    Country|Path|REGEX
    xyz|x/y/z/job|.*\.csv$
    abc|a/b/job|.*\.csv$
    def|d/job|.*\.csv$

    then with that list use step "Get File Names". Check "Filename is defined in a field?"
    Get filename from field : Path
    Get wildcard from fiekld(RegExp) : REGEX

    Then you have a list with all the files you want to read

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.