Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Read first line from multiple files

  1. #1
    Join Date
    Aug 2015
    Posts
    11

    Default Read first line from multiple files

    Hi

    I need to get the length of the first line of each file from a stream of filenames. I tried to read the first line of each file using Text File Input and Limit = 1, followed by a calculator step. It works with one file, but it seems the limit applies to the whole step, across files, so the Text File Input never even opens the additional files since it has already reached the limit. I'm not sure how I would accomplish this now without some very heavy read all, group by combination.

    Thanks!

  2. #2
    Join Date
    Apr 2008
    Posts
    1,771

    Default

    You should read each file at a time.
    Do a search for looping through a list of files.
    You will need a job and a transformation within that job.
    -- Mick --

  3. #3
    Join Date
    Aug 2015
    Posts
    11

    Default

    Solved with:

    Outter Job
    Inner transformation to list files, then back to job
    Each file to Inner transformation to read first line, process file, etc

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.