<?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: How to do Dynamic property naming in NIfi? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-do-Dynamic-property-naming-in-NIfi/m-p/369388#M240480</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/104637"&gt;@anony&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can not use NiFi Expression Language (NEL) in component property names. NEL can only be used in component property values and even then, only when the component property supports Expression language.&lt;BR /&gt;&lt;BR /&gt;With ExtractText, any dynamic properties added will create a new FlowFile Attribute on the outbound FlowFile with an attribute name matching the property name "&lt;SPAN&gt;${reasonId}" and the attribute&amp;nbsp;set the the capture group string extracted from the source FlowFiles content.&lt;BR /&gt;&lt;BR /&gt;Without understanding yoru complete use case, it is difficult to offer alternative possible solutions.&lt;BR /&gt;Why is it important to set a FlowFile property name to a reasonID?&amp;nbsp; FlowFile attribute property names only mean something to NiFi.&amp;nbsp; So if you were able to create dynamic property names, then how would you programmatically&amp;nbsp;use them later in your dataflow as FlowFiles will have a variety of Attribute property names?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic"&gt;If you found that the provided solution(s) assisted you with your query, please take a moment to login and click&lt;/FONT&gt;&amp;nbsp;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;Accept as Solution&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;below each response that helped.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;Matt&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Apr 2023 21:03:46 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2023-04-25T21:03:46Z</dc:date>
    <item>
      <title>How to do Dynamic property naming in NIfi?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-do-Dynamic-property-naming-in-NIfi/m-p/369374#M240475</link>
      <description>&lt;P&gt;I am assigning a value to "reasonId" and later using it as a dynamic property in other processor(ExractText).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ff.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37366i76F4D5B1618E7A44/image-size/large?v=v2&amp;amp;px=999" role="button" title="ff.png" alt="ff.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now, I want to assign this as an dynamic property so that I can store some API response into this. Means reasonId value and Api response both should change evertytime.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ff2.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37367i4B7B50CE5819A960/image-size/large?v=v2&amp;amp;px=999" role="button" title="ff2.png" alt="ff2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here I want this [${reasonId}=(.*)] to be like this:-&lt;/P&gt;&lt;P&gt;6099 = Api response&amp;nbsp; &amp;nbsp; &amp;nbsp;(Everytime value of 6099 should change as it is a dynamic variable)&lt;/P&gt;&lt;P&gt;But,&lt;/P&gt;&lt;P&gt;I am getting it like this&lt;/P&gt;&lt;P&gt;${reasonId}=Api response&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Why there is no 6099 instead of reasonId. Does it means Dynamic property assignment is not working properly?&amp;nbsp;&lt;/P&gt;&lt;P&gt;or I can use some jolt spec and all for this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically I want reasonId to hold its value 6099 and Api response should be store in 6099 instead of ${reasonId}.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 17:27:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-do-Dynamic-property-naming-in-NIfi/m-p/369374#M240475</guid>
      <dc:creator>anony</dc:creator>
      <dc:date>2023-04-25T17:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to do Dynamic property naming in NIfi?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-do-Dynamic-property-naming-in-NIfi/m-p/369388#M240480</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/104637"&gt;@anony&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can not use NiFi Expression Language (NEL) in component property names. NEL can only be used in component property values and even then, only when the component property supports Expression language.&lt;BR /&gt;&lt;BR /&gt;With ExtractText, any dynamic properties added will create a new FlowFile Attribute on the outbound FlowFile with an attribute name matching the property name "&lt;SPAN&gt;${reasonId}" and the attribute&amp;nbsp;set the the capture group string extracted from the source FlowFiles content.&lt;BR /&gt;&lt;BR /&gt;Without understanding yoru complete use case, it is difficult to offer alternative possible solutions.&lt;BR /&gt;Why is it important to set a FlowFile property name to a reasonID?&amp;nbsp; FlowFile attribute property names only mean something to NiFi.&amp;nbsp; So if you were able to create dynamic property names, then how would you programmatically&amp;nbsp;use them later in your dataflow as FlowFiles will have a variety of Attribute property names?&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic"&gt;If you found that the provided solution(s) assisted you with your query, please take a moment to login and click&lt;/FONT&gt;&amp;nbsp;&lt;FONT face="arial black,avant garde" color="#FF0000"&gt;Accept as Solution&amp;nbsp;&lt;/FONT&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;below each response that helped.&lt;BR /&gt;&lt;BR /&gt;Thank you,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="batang,apple gothic" color="#000000"&gt;Matt&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Apr 2023 21:03:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-do-Dynamic-property-naming-in-NIfi/m-p/369388#M240480</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-04-25T21:03:46Z</dc:date>
    </item>
  </channel>
</rss>

