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