104 – Working With Apache NiFi Templates

 
 

This course assumes you are familiar with the basic of Apache NiFi – Read here

 
 

You can follow along using our Auto-Launching NiFi – Learn How Here

 
 
 

Apache NiFi’s out of the box functionality can be greatly increased through working with templates. Templates enable flows to be saved, version controlled, and distributed.

The best way to familiarize yourself with templates it to make one. A template can composed of processors, connectors, processor groups and even controller services. To get started creating the flow below by dragging the processors in and connecting them. The exact processors are not as critical, the key point is to have two processors connected to demonstrate how to use a template.

 

A simple flow, any two processors can be used for this lesson

 

To create the template:

  1. Hold down shift and left click each processor group and the connection

  2. Click the Save template button on the left hand side of the screen

  3. Give the template a name and hit create>ok

The Create and Upload buttons are next to each other

 

Additionally, existing templates can be uploaded using the “Upload Template” button. This is useful when importing a pre-existing workflow between environments or when restoring from version control.

 
 

You can follow along using our Auto-Launching NiFi – Learn How Here

 
 

This template is now usable like any other processor via drag-and-drop. Drag the template from the list of options, select the template and hit add

 

 

 

Finally, to manage and download your templates you can use the NiFi Template Manager. On this screen you can see when templates were created, download them, or even delete them all together. This is accessible from the menu in the top right hand side of the NiFi page and going to templates.

 

Next Steps:

Start using Apache NiFi on AWS – Learn how here

Read Apache NiFi for Dummies for learn even more

Learn how to use Apache NiFi Controller Services