- 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 dynamically apply Parameter Contexts based on environment ?
- Labels:
-
NiFi Registry
Created ‎09-18-2020 08:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
in my Nifi flows I have created 3 parameter context group each for an environment(DEV, SIT, PROD) respectively.....
As of now whenever I migrate my flow to other environments , I manually select the paramater contexts based on the environment.
I want to know if there is a way I can dynamically apply them without me manually selecting the parameter context groups manually
Is there a way I can apply them dynamically ?
Created ‎09-19-2020 06:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @SashankRamaraju
Parameter Context Groups(PMG) have to be added manually only. But, you can have a Parameter Context Group specific to environment. I mean, for example, a PMG with name 'Env variables' (say) has DEV values in DEV environment and PROD values in PROD environment. So, you will only be selecting the PMG 'Env variables' in all the environments, but, the config(values) is specific to environment.
If it is mandatory to have 3 PMGs, selecting the PMG is manual, yet, if it is ok, you can use something like below.
Generate FlowFile config:Generate FlowFile config
UpdateAttribute config:UpdateAttribute config
Here, I am trying to evaluate #{DEV_env}. And DEV is coming from the attribute env.
