<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Parameterized NiFi template handling in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Parameterized-NiFi-template-handling/m-p/199480#M74202</link>
    <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/2056/ahadjidj.html" nodeid="2056"&gt;@Abdelkrim Hadjidj&lt;/A&gt;, thanks for your answer. I've begun looking onto your suggestions and I think we can probably build something suitable using a combination of the features you mentioned. Next week I’ll try experimenting with this. Thanks again. Dave.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Feb 2018 23:31:46 GMT</pubDate>
    <dc:creator>david_a_doran</dc:creator>
    <dc:date>2018-02-02T23:31:46Z</dc:date>
    <item>
      <title>Parameterized NiFi template handling</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Parameterized-NiFi-template-handling/m-p/199478#M74200</link>
      <description>&lt;P&gt;The system we are building will be multi-tenant and involve several NiFi Flows. To make this manageable we want the ability to define a single NiFi flow as a parameterized template, of which multiple instances can be started and stopped from the command-line with varying parameters.&lt;/P&gt;&lt;P&gt;One example flow might be a file pump: It consumes files of records from a watched folder, converts the contents to a matching Avro schema, writes to a Kafka topic for that record type. Having multiple record types, we need several instances of this flow running with the only differences being source folder, Avro schema name &amp;amp; Kafka topic name, all of which are simple parameters.&lt;/P&gt;&lt;P&gt;Similarly, the same NiFi flows will be used across the many tenants in the system, but started under different credentials to ensure there’s no possibility of ‘data crossing’ between tenants. Parameters might include the tenant ID, possibly derived from the credentials.&lt;/P&gt;&lt;P&gt;Requires&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;ability to define a NiFi template containing parameters&lt;/LI&gt;&lt;LI&gt;start any number of instances of that template with defined parameters from command-line&lt;/LI&gt;&lt;LI&gt;monitor running of the resulting flows. Note: Such flows should be read-only in the UI as it's too easy to mistakenly edit and break them.&lt;/LI&gt;&lt;LI&gt;stop a running instance from command-line&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I can’t find anything in NiFi like these capabilities. Yes, there are templates and process groups, but manually building these via the UI is arduous and prone to error, and there’s no obvious way to generalize a flow (analogous to a class) and create it multiple times with different parameters (instance of a class).&lt;/P&gt;&lt;P&gt;The nearest I saw was this, from Andrew Grande of Hortonworks: &lt;A href="https://github.com/aperepel/nifi-api-deploy"&gt;https://github.com/aperepel/nifi-api-deploy&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But it looks unofficial and not maintained (“&lt;EM&gt;Note: this was originally created for NiFi 0.x. REST APIs and concepts have changed significantly in NiFi 1.x&lt;/EM&gt;”)&lt;/P&gt;&lt;P&gt;Is there anything more suitable or official out there? Or will we need to build a tool akin to (or starting from) Andrew’s, to drive the REST API?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Feb 2018 22:17:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Parameterized-NiFi-template-handling/m-p/199478#M74200</guid>
      <dc:creator>david_a_doran</dc:creator>
      <dc:date>2018-02-01T22:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Parameterized NiFi template handling</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Parameterized-NiFi-template-handling/m-p/199479#M74201</link>
      <description>&lt;P&gt;Hi &lt;A href="https://community.hortonworks.com/questions/167397/parameterized-nifi-template-handling.html#"&gt;@David Doran&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;I am not sure there out of the box solution to your problem but there several assets you can use to implement this.&lt;/P&gt;&lt;P&gt;NiFi 1.5/HDF 3.1 introduced Variable Registry to handle this use case : &lt;A href="https://cwiki.apache.org/confluence/display/NIFI/Variable+Registry" target="_blank"&gt;https://cwiki.apache.org/confluence/display/NIFI/Variable+Registry&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/articles/154951/introduce-a-ui-driven-variable-registry-starting-f.html" target="_blank"&gt;https://community.hortonworks.com/articles/154951/introduce-a-ui-driven-variable-registry-starting-f.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You have also a new flow registry that can be use as a repository to deploy these flows. Here an article that shows how to combine these two features : &lt;A href="https://medium.com/@abdelkrim.hadjidj/fdlc-towards-flow-development-life-cycle-with-nifi-registries-82e1ee866fab" target="_blank"&gt;https://medium.com/@abdelkrim.hadjidj/fdlc-towards-flow-development-life-cycle-with-nifi-registries-82e1ee866fab&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Finally look to NiPyAPI for scripting these actions : &lt;A href="https://github.com/Chaffelson/nipyapi" target="_blank"&gt;https://github.com/Chaffelson/nipyapi&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/articles/167364/nifi-sdlc-automation-in-python-with-nipyapi-part-1.html" target="_blank"&gt;https://community.hortonworks.com/articles/167364/nifi-sdlc-automation-in-python-with-nipyapi-part-1.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 00:11:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Parameterized-NiFi-template-handling/m-p/199479#M74201</guid>
      <dc:creator>ahadjidj</dc:creator>
      <dc:date>2018-02-02T00:11:08Z</dc:date>
    </item>
    <item>
      <title>Re: Parameterized NiFi template handling</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Parameterized-NiFi-template-handling/m-p/199480#M74202</link>
      <description>&lt;P&gt;Hi &lt;A rel="user" href="https://community.cloudera.com/users/2056/ahadjidj.html" nodeid="2056"&gt;@Abdelkrim Hadjidj&lt;/A&gt;, thanks for your answer. I've begun looking onto your suggestions and I think we can probably build something suitable using a combination of the features you mentioned. Next week I’ll try experimenting with this. Thanks again. Dave.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Feb 2018 23:31:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Parameterized-NiFi-template-handling/m-p/199480#M74202</guid>
      <dc:creator>david_a_doran</dc:creator>
      <dc:date>2018-02-02T23:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Parameterized NiFi template handling</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Parameterized-NiFi-template-handling/m-p/199481#M74203</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/45381/davidadoran.html" nodeid="45381"&gt;@David Doran&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you found that this answer addressed your question,
please take a moment to click "Accept" below.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Feb 2018 15:17:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Parameterized-NiFi-template-handling/m-p/199481#M74203</guid>
      <dc:creator>ahadjidj</dc:creator>
      <dc:date>2018-02-03T15:17:58Z</dc:date>
    </item>
  </channel>
</rss>

