Support Questions

Find answers, ask questions, and share your expertise

NiFi templates not persisting unless exported from UI

avatar
Rising Star

Currently any NiFi templates that are created are not stored anywhere outside of flow.xml.gz unless they are explicitly downloaded using the NiFi UI.

I can see them within my flow.xml.gz file and can still download them and import them using the UI, so I am not experiencing any issues in terms of the template function. However it was my understanding that active templates would automatically be persisted in directory conf/templates, or otherwise in a custom location using the nifi.templates.directory property.

Is this the correct behaviour? Or is the templates directory more a convenience for downloaded templates to be manually stored into? I have NiFi version 1.1.2.

Thanks!

1 ACCEPTED SOLUTION

avatar
Master Guru

The templates directory is left-over from old versions of NiFi (0.x).. in the 1.x line all templates are stored with in flow.xml.gz in order to inherit the same security model as other components when running in a secure instance. When you upload a template in 1.x, you are doing so through the context palette on the left which is uploading it into the current processor group you are in (or the root group if on the root canvas) and if you create a new template it is being created in the process group you are in.

View solution in original post

4 REPLIES 4

avatar
Master Guru

The templates directory is left-over from old versions of NiFi (0.x).. in the 1.x line all templates are stored with in flow.xml.gz in order to inherit the same security model as other components when running in a secure instance. When you upload a template in 1.x, you are doing so through the context palette on the left which is uploading it into the current processor group you are in (or the root group if on the root canvas) and if you create a new template it is being created in the process group you are in.

avatar
Rising Star

Thanks for clearing it up @Bryan Bende, much appreciated.

avatar
Master Mentor

@Emily Sharpe

The templates directory was left around to assist those users who are moving from NiFi 0.x to NiFi 1.x baseline. Since NiFi 0.x placed all generated templates in this directory, you can copy those templates over to the configured directory in NIFi 1.x and NiFi will load them in to the flow.xml.gz file for you on startup. There really is no other use for this property other then the above migration.

Thanks, Matt

avatar
Rising Star

Thanks @Matt Clarke, much appreciated