- Apache NiFi - Discussion
- Apache NiFi - Useful Resources
- Apache NiFi - Quick Guide
- Apache NiFi - Logging
- Apache NiFi - Custom Controllers Service
- Apache NiFi - Custom Processor
- Apache NiFi - Reporting Task
- Apache NiFi - Controller Settings
- Apache NiFi - Remote Process Group
- Apache NiFi - Upgrade
- Apache NiFi - Monitoring
- Apache NiFi - Data Provenance
- Apache NiFi - API
- Apache NiFi - Templates
- Apache NiFi - Creating Flows
- Apache NiFi - Administration
- Apache NiFi - Configuration
- Apache NiFi - Labels
- Apache NiFi - Process Groups
- Apache NiFi - Queues
- Apache NiFi - FlowFile
- Apache NiFi - Processors Relationship
- Apache NiFi - Processors Categorization
- Apache NiFi - Processors
- Apache NiFi - User Interface
- Apache NiFi - Environment Setup
- Apache NiFi - Basic Concepts
- Apache NiFi - Introduction
- Apache NiFi - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Apache NiFi - Templates
Apache NiFi offers the concept of Templates, which makes it easier to reuse and distribute the NiFi flows. The flows can be used by other developers or in other NiFi clusters. It also helps NiFi developers to share their work in repositories pke GitHub.
Create Template
Let us create a template for the flow, which we created in chapter no 15 “Apache NiFi - Creating Flows”.
Select all the components of the flow using shift key and then cpck on the create template icon at the left hand side of the NiFi canvas. You can also see a tool box as shown in the above image. Cpck on the icon create template marked in blue as in the above picture. Enter the name for the template. A developer can also add description, which is optional.
Download Template
Then go to the NiFi templates option in the menu present at the top right hand corner of NiFi UI as show in the picture below.
Now cpck the download icon (present at the right hand side in the pst) of the template, you want to download. An XML file with the template name will get downloaded.
Upload Template
To use a template in NiFi, a developer will have to upload its xml file to NiFi using UI. There is an Upload Template icon (marked with blue in below image) beside Create Template icon cpck on that and browse the xml.
Add Template
In the top toolbar of NiFi UI, the template icon is before the label icon. The icon is marked in blue as shown in the picture below.
Drag the template icon and choose the template from the drop down pst and cpck add. It will add the template to NiFi canvas.
Advertisements