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 02-13-2017 06:57 AM
Hi,
I have a file, which can be used for lookup during a data flow. How do I read the file and put it in the DistributedCache?
Thanks,
Avijeet
Created on 02-13-2017 09:29 AM - edited 08-18-2019 03:38 AM
What @Jobin George suggested would help to share common static configuratiosn at various part of a NiFi flow.
In addition to that, if you'd like to know how to Put/Get from distributed cache, and how to enrich FlowFiles with cached values, this example might be helpful:
Template file is available here:
https://gist.github.com/ijokarumawak/8ba9a2a1b224603f877e960a942a6f2b
Thanks,
Koji
Created on 02-13-2017 07:25 AM - edited 08-18-2019 03:38 AM
Hi @Avijeet Dash,
See if this helps:
One easy way of loading key value pairs in NiFi is using NiFi Custom Properties registry. This is a comma-separated list of file location paths for one or more custom property files.
For example I can load a file named nifi_registry with key value pairs separated using '=' (say i have OS=MAC in it), and can reference ${OS} to substitute its value MAC using NiFi expression language(after restarting nifi). Its updated in nifi.property file using nifi.variable.registry.properties
You can read about it here:
https://nifi.apache.org/docs/nifi-docs/html/administration-guide.html#custom_properties
Thanks,
Jobin
Created on 02-13-2017 09:29 AM - edited 08-18-2019 03:38 AM
What @Jobin George suggested would help to share common static configuratiosn at various part of a NiFi flow.
In addition to that, if you'd like to know how to Put/Get from distributed cache, and how to enrich FlowFiles with cached values, this example might be helpful:
Template file is available here:
https://gist.github.com/ijokarumawak/8ba9a2a1b224603f877e960a942a6f2b
Thanks,
Koji