Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Count files before Get file names step

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2011
    Posts
    13

    Default Count files before Get file names step

    Is there a way to count zip files in a directory using a wildcard before running the 'Get file names' step.

    I would like to evaluate whether there are files in the directory before running the 'Get file names' step so I can log that there were no files to process.

    I tried the 'Detect empty stream' step after the Get file name step. It works but I can't reuse the 'Get rows from result' step values (in a earlier step before the the 'Get file name step') in the log message.

  2. #2
    Join Date
    Aug 2016
    Posts
    142

    Default

    Something like this should do it, just modify the directory in both "Get File Names" steps: File Count.ktr

  3. #3
    Join Date
    Nov 2013
    Posts
    382

    Default

    Evaluate files metric Job step will do it.

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.