- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
File to Fetch property in FetchFile processor
Created ‎08-07-2018 09:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I need some help in giving the file name path in FetchFile processor. I am filling the full path of the file inside quotes and then after $, providing the exact filename with extension. Still the processor could not identify the file. Kindly help.
Created on ‎08-07-2018 10:03 PM - edited ‎08-17-2019 08:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Fetch File processor works in conjunction with List file processor as list file processor adds
${absolute.path,${filename}
attributes to the flowfiles then Fetch File processor fetches those files.
If you are not using ListFile processor then you need to having fully qualified file path to be mentioned in the File to Fetch property value and this processor needs an upstream connection to trigger.
Example:
I want to fetch file_fetch.txt file from temp directory then Fetch File configs:
Now FetchFile processor will fetches this file_fetch.txt from temp directory and transfers to success relationship.
If you are having file_path attribute with value as /temp/file_fetch.txt associated with the flowfile then Configs:
Now the processor checks the attribute value and dynamically fetches the files from the directory if NiFi have access to those directories.
Flow:
As this processor expects upstream connection and i'm not using ListFile processor instead i use GenerateFLowfile (added file_path attiribute) processor to trigger Fetch File processor (or) you can simply use ListFile + FetchFile processors also.
Created ‎08-07-2018 10:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes. I understand. I see the absolute path and the correct file name identified by the ListFile Processor. If that is the case, Can I leave the File to Fetch property in FetchFile processor as such? I mean $(absolute.path}/${filename}?
Created ‎08-08-2018 02:22 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, leave the Fetch File processor property as default. processor will fetches those files from the directory.
