- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
how to keep Environmental property file in cache , which will be used across the processor.
- Labels:
-
Apache NiFi
Created ‎11-08-2016 10:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Team,
I have requirement like need to read the environment property file and keep in memory, also need to auto refresh is any update done in property file. Example Env.properties
parent_path = /sourcesystem/country/
Auth_key = 234234fsdaf234
password =**************
IN = india
i need to use the above property in my processor across the flow. Example in ListFile processor i want to use ${parent_path} , this should replace "/sourcesystem/country/ " value.
Created ‎11-08-2016 12:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are 2 ways to do it:
1) Custom properties file
- put name=value pairs in custom property file: parent_path=/sourcesystem/country/
- put custom property file in a location you choose on the nifi cluster
- open the existing nifi.properties file
- for property nifi.variable.registry.properties, set it to the path to your custom property file (or a csv of a list of custom property files)
- in your processor, use ${parent_path} as you indicate
2) OS environment variable (best for sensitive values not to be exposed in a file)
- set the OS environment variable: export Auth_key=234234fsdaf234
- reference ${Auth_key} in your processor
The following links show more details
Created ‎11-08-2016 12:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are 2 ways to do it:
1) Custom properties file
- put name=value pairs in custom property file: parent_path=/sourcesystem/country/
- put custom property file in a location you choose on the nifi cluster
- open the existing nifi.properties file
- for property nifi.variable.registry.properties, set it to the path to your custom property file (or a csv of a list of custom property files)
- in your processor, use ${parent_path} as you indicate
2) OS environment variable (best for sensitive values not to be exposed in a file)
- set the OS environment variable: export Auth_key=234234fsdaf234
- reference ${Auth_key} in your processor
The following links show more details
Created ‎11-08-2016 02:19 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried with 1) Custom properties file. This is working. Thank you Greg Keys
Created ‎11-08-2016 02:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @Greg Keys for your quick response. Custom Properties file is working absolutely fine
Created ‎11-08-2016 02:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad it helped 🙂 (If you want to get more reuse from nifi, see first link in answer for reusing templates during development).
