Created on 09-10-201909:00 AM - edited 09-10-201910:26 AM
When developing NiFi flows with python, it's sometimes a headache to build customized configurations for your processors. Every processor is different and has many different parameters to customize depending on your flows needs and requirements. To accelerate development, I use the development tools in my chrome browser to help accelerate development by extracting the config files from the rest calls the NiFi application makes.
Open your browser and point it to your NiFi instances. Once in the UI right click on the gray bar and select "inspect".
This will open up a development view of the UI. Next, click on the network tab to view and debug network activity.
In this view, all network related traffic will be displayed here.
Notice you can see all the rest calls that the NiFi is making behind the scene. This can be quite helpful when customizing processors. When you drag a processor on the canvas and parameterize it, a rest call is made that creates the processor. Along with that processor creation rest call is a configuration payload that we can capture and use with our NiFi python development.
Example:
Create a simple generate flow file processor. When you drag it into the canvas you'll see an entry be posted to the network. It will be the rest call made to create the processor. If you scroll down to the request payload, you'll get a view of the configuration that was submitted with the processor.
Next, update the processor by changing the flow file custom text. You'll immediately see an new event posted on the network. This event will give you the configuration for the processor:
Here is the JSON representation:
Using this tool you can easily extract the configuration properties for any processor and use them when designing programatic flows using python.