Skip to main content
Ghilani
Silver ⭐️⭐️⭐️
Nov 29, 2022 10:40 AM UTC
Solved

Where does Nifi store templates?

Can you help me to find where do Nifi stores templates?
I am running Nifi on a docker container.
PS: there is no dir under the folder conf.
Here is the WORKDIR:

Ghilani_0-1669718369646.png

 

MattWho
MattWhoAnswer
Titanium ⭐️⭐️
Dec 5, 2022 7:33 PM UTC

@Ghilani 
NiFi stores Templates in the flow.xml.gz file.  the flow.xml.gz is just a compressed copy of dataflow(s) which reside inside NiFi's heap memory while NiFi is running.   It is not recommended to keep templates in your NiFi.  NiFi templates are also deprecated and will go away in next major release. It is recommended to use NiFi-registry to store version controlled flows.  If not using NiFi-Registry, Flow definitions should be downloaded instead of creating templates and stored safely somewhere outside of NiFi itself.

A flow definition can be downloaded by right clicking on a process group in NiFi and selecting "Download flow definition".  This json file will be generated of that flow and downloaded.  Flow definitions can be uploaded to NiFi by dragging the create Process Group icon to the canvas and selecting option to upload flow definition.

 

If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.

Thank you,

Matt

1 reply

MattWho
Titanium ⭐️⭐️
MattWhoAnswer
Titanium ⭐️⭐️
Dec 5, 2022 7:33 PM UTC

@Ghilani 
NiFi stores Templates in the flow.xml.gz file.  the flow.xml.gz is just a compressed copy of dataflow(s) which reside inside NiFi's heap memory while NiFi is running.   It is not recommended to keep templates in your NiFi.  NiFi templates are also deprecated and will go away in next major release. It is recommended to use NiFi-registry to store version controlled flows.  If not using NiFi-Registry, Flow definitions should be downloaded instead of creating templates and stored safely somewhere outside of NiFi itself.

A flow definition can be downloaded by right clicking on a process group in NiFi and selecting "Download flow definition".  This json file will be generated of that flow and downloaded.  Flow definitions can be uploaded to NiFi by dragging the create Process Group icon to the canvas and selecting option to upload flow definition.

 

If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.

Thank you,

Matt

Translate