Support Questions

Find answers, ask questions, and share your expertise

multiple Nifi dataflows together

avatar
Super Collaborator

I have a working Nifi dataflow that is pulling the log files and parsing them. Now I want to create a new one doing something else , I don't see any option to save the dataflow , how is it done ? I want to be able to switch between different data flows turning them off when not used.

1 ACCEPTED SOLUTION

avatar
Master Guru

There is only one canvas that can have many logical dataflows. Typically you can organize each logical dataflow into a process group, and then start and stop the whole process group.

View solution in original post

5 REPLIES 5

avatar
Master Guru

There is only one canvas that can have many logical dataflows. Typically you can organize each logical dataflow into a process group, and then start and stop the whole process group.

avatar
Super Collaborator

how can I create these "process groups" ?

avatar
Master Mentor
@Sami Ahmad

Every change you make to the NiFi canvas is immediately saved to the flow.xml.gz file. No need to manually initiate a save.

Each installation of NiFi provides you with a single UI for building a dataflow. You can build as many different dataflow as you want on this canvas. These different dataflows do not need to be connected in any way.

The most common approach to what you are doing is to create a different process group for each of your unique dataflows. To add a new process group to the canvas, drag the process group icon 7177-screen-shot-2016-08-31-at-43215-pm.png on to the canvas and give it unique name that identifies the dataflow it contains. If you double click on that process group, you will enter it giving you a blank canvas to work with.

7178-screen-shot-2016-08-31-at-43605-pm.png

So here you can see I have two process groups that are not connected in any way. One contains a dataflow that consists of 6 processors while the other has 89. I can right click on either of these process groups and select either start or stop from the context menu.

7179-screen-shot-2016-08-31-at-43750-pm.png

That start or stop action is applied against every processor within that process group. so this gives you an easy way to stop one dataflow and start another. You could even have both running at the same time.

Matt

avatar
Master Mentor

You can also save portions or all of you dataflow in a to NiFi templates that can be exported for use on other NiFi installations. To create a template simply highlight all the components you want in your template (If you highlight a process group, all components within that process group will be added to the template). Then click on the

7180-screen-shot-2016-08-31-at-44400-pm.png "create template" icon in the upper middle create your template. The Templates manager UI can be used to export and import these templates from your NiFi. It can be access via this icon 7191-screen-shot-2016-08-31-at-44512-pm.png in the upper right corner of the NiFi UI. *** Note: NiFi templates are sanitized of any sensitive properties values (A sensitive property value would be any value that would be encrypted. In NiFi that would be any passwords) Matt

avatar
Super Collaborator

Thanks !

that was helpful . I don't see anywhere "Accept"