Support Questions
Find answers, ask questions, and share your expertise

How to provide the path in NiFi FetchFile processor

Solved Go to solution

How to provide the path in NiFi FetchFile processor

I have few files as follows.

/a/b/c/1.txt

/a/b/c/2.csv

/a/b/c/3.csv.gz

I need to fetch all these files using FileFetch processor. What should be the expression in the 'File To Fetch' property?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to provide the path in NiFi FetchFile processor

Guru

You should place a ListFile processor in front of you FetchFile.

Alternatively, you could use GetFile, with these properties:

Input Directory: /a/b/c

File Filter: [^\.].* (or change regex if you are filtering specific files by filename pattern)

Note that GetFile does not have the configuration to move the file after processing (creating flowfile)

View solution in original post

3 REPLIES 3

Re: How to provide the path in NiFi FetchFile processor

Guru

You should place a ListFile processor in front of you FetchFile.

Alternatively, you could use GetFile, with these properties:

Input Directory: /a/b/c

File Filter: [^\.].* (or change regex if you are filtering specific files by filename pattern)

Note that GetFile does not have the configuration to move the file after processing (creating flowfile)

View solution in original post

Re: How to provide the path in NiFi FetchFile processor

Thanks for the response Greg. My actual problem is to check for files in a directory and send an email notofication is there are none. Could you please suggest me something?

Re: How to provide the path in NiFi FetchFile processor

Guru

@NAVEEN KUMAR I would post that as a separate question, since it is different from the question you posed. (You will also get more exposure)