Importing individual flow definitions in NiFi
While I recommend you Version Control & Deploy flows with NiFi Registry you can also quickly import flow definition json files straight from the NiFi GUI. This post will quickly demonstrate how.
To get some json files to work with, clone my nifi-snippets repo that contains all of the NiFi flow demos that I have written about.
git clone firstname.lastname@example.org:sdairs/nifi-snippets.git
Now, go to your NiFI instance & drag on a new Process Group from the top bar.
In the Process Group dialogue, hit the Browse button (it looks like two boxes with an up-arrow) inside the PG Name input field.
This will open a file browser to let you select a flow definition to import. Navigate to the clones git repo and select the json file to upload - I will upload the simple-rest-api flow by selecting simple-rest-api.json and hitting Open.
The dialogue box will show you which file is being uploaded and pre-populating the name field with the name of the file - you are welcome to change the name. Click Add.
The new Process Group will be added to the flow.
Enter the Process Group by double clicking on it, and you’ll see the flow that was imported.
Note: importing a Flow Definition does not enable the controller services, so in this case the HandleHTTPRequest and HandleHTTPResponse processors have invalid config warnings.
That’s all there is to it.
apache cloudera nifi