Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 08-21-2025 11:29 PM
Hi Expert,
I've the incoming flowfile have a attribute somethings like cdc = 12. And I'd like to list file in the folder looks like /home/user/cdc=${cdc}.
Because the listfile not required an incomming flowfile. So How can I achieve this?
Thank you so much.
Created 08-22-2025 03:01 PM
Hello @HoangNguyen,
If I do not understand wrong, what you want is not possible.
ListFile does not support incoming FlowFile as an source.
To do that, you will need to use variable registry.
Look here:
Display Name: Input Directory
API Name: Input Directory
Description: The input directory from which files to pull files
Supports Expression Language: true (will be evaluated using variable registry only)
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.9.2/org.apache...
Looking on that, FetchFile will do what you need:
Display Name: File to Fetch
API Name: File to Fetch
Default Value: ${absolute.path}/${filename}
Description: The fully-qualified filename of the file to fetch from the file system
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.9.2/org.apache...
Created 08-22-2025 03:01 PM
Hello @HoangNguyen,
If I do not understand wrong, what you want is not possible.
ListFile does not support incoming FlowFile as an source.
To do that, you will need to use variable registry.
Look here:
Display Name: Input Directory
API Name: Input Directory
Description: The input directory from which files to pull files
Supports Expression Language: true (will be evaluated using variable registry only)
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.9.2/org.apache...
Looking on that, FetchFile will do what you need:
Display Name: File to Fetch
API Name: File to Fetch
Default Value: ${absolute.path}/${filename}
Description: The fully-qualified filename of the file to fetch from the file system
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.9.2/org.apache...
Created 08-24-2025 09:23 PM
Gracias Andrés, It's really helpful
Created on 08-25-2025 05:20 AM - edited 08-25-2025 05:23 AM
@HoangNguyen
Keep in mind that the Apache NiFi Variable Registry no longer exist in Apache NiFi 2.x releases and there is no more development of the Apache NIFi 1.x versions. NiFi Parameter Contexts, which were introduced in later versions of Apache NiFi 1.x, provides similar capability going forward and should be used instead of the variable registry. You'll be forced to transition to Parameter Contexts in order to move to Apache NiFi 2.x. versions.
Please help our community grow. If you found any of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "Accept as Solution" on one or more of them that helped.
Thank you,
Matt