<?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: Store uuid in a another attribute in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Store-uuid-in-a-another-attribute/m-p/282223#M209852</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/70200"&gt;@LuxIsterica&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The unique uuid assigned to a NiFi processor component is not exposed to NiFi Expression Language (EL).&lt;BR /&gt;So it is not something you can accomplish dynamically via the NiFi EL.&lt;BR /&gt;&lt;BR /&gt;What I a confused by is your screenshot.&amp;nbsp; Your screenshot does not show the UUID of the processor.&amp;nbsp; It is showing the unique UUID assigned to a FlowFile in position 1 on a connection.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If what you are really looking for is the FlowFile UUID and not the processor component UUID, then that can be access via the NiFI EL.&lt;BR /&gt;The uuid is assigned by default to an attribute "uuid" (all lowercase) on every FlowFile that is created in NiFi.&amp;nbsp; It can be accessed using ${uuid} in NiFi EL.&amp;nbsp; &amp;nbsp;If you wanted to preserve that uuid into another FlowFile Attribute, you could use UpdateAttribute&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;property:     Value:

id            ${uuid}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
    <pubDate>Wed, 06 Nov 2019 15:09:08 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2019-11-06T15:09:08Z</dc:date>
    <item>
      <title>Store uuid in a another attribute</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Store-uuid-in-a-another-attribute/m-p/282220#M209849</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Is it possible to save the uuid of a processor in an attribute?&lt;/P&gt;
&lt;P&gt;For example,&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;i have the processor ExecuteSQL, which has this uuid&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="uuid.PNG" style="width: 930px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/25183i84B4B3C55AB26794/image-size/large?v=v2&amp;amp;px=999" role="button" title="uuid.PNG" alt="uuid.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I wish I could save the uuid like this:&lt;BR /&gt;id = $ .uuid&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It's possible?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 16:29:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Store-uuid-in-a-another-attribute/m-p/282220#M209849</guid>
      <dc:creator>LuxIsterica</dc:creator>
      <dc:date>2019-11-06T16:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Store uuid in a another attribute</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Store-uuid-in-a-another-attribute/m-p/282223#M209852</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/70200"&gt;@LuxIsterica&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The unique uuid assigned to a NiFi processor component is not exposed to NiFi Expression Language (EL).&lt;BR /&gt;So it is not something you can accomplish dynamically via the NiFi EL.&lt;BR /&gt;&lt;BR /&gt;What I a confused by is your screenshot.&amp;nbsp; Your screenshot does not show the UUID of the processor.&amp;nbsp; It is showing the unique UUID assigned to a FlowFile in position 1 on a connection.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If what you are really looking for is the FlowFile UUID and not the processor component UUID, then that can be access via the NiFI EL.&lt;BR /&gt;The uuid is assigned by default to an attribute "uuid" (all lowercase) on every FlowFile that is created in NiFi.&amp;nbsp; It can be accessed using ${uuid} in NiFi EL.&amp;nbsp; &amp;nbsp;If you wanted to preserve that uuid into another FlowFile Attribute, you could use UpdateAttribute&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;property:     Value:

id            ${uuid}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 15:09:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Store-uuid-in-a-another-attribute/m-p/282223#M209852</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2019-11-06T15:09:08Z</dc:date>
    </item>
    <item>
      <title>Re: Store uuid in a another attribute</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Store-uuid-in-a-another-attribute/m-p/282233#M209858</link>
      <description>&lt;P&gt;You are right.&lt;BR /&gt;I'm still a neophyte in Nifi.&lt;BR /&gt;However in the stream I saw that the attribute "filename" that generated that executesql is "inherited" in all processors.&lt;BR /&gt;Can I save that too?&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 16:17:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Store-uuid-in-a-another-attribute/m-p/282233#M209858</guid>
      <dc:creator>LuxIsterica</dc:creator>
      <dc:date>2019-11-06T16:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: Store uuid in a another attribute</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Store-uuid-in-a-another-attribute/m-p/282240#M209862</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/70200"&gt;@LuxIsterica&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"filename" is also another FlowFile attribute that is created by default on every FlowFile that is created in NiFi.&amp;nbsp; With some processors a filename can not be derived from or created based in the content that is received.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;ExecuteSQL (no inbound connection) and generateFlowFile processors are good examples here.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;In case like this, NiFi will just default to using the FlowFile's uuid as the filename also.&lt;BR /&gt;&lt;BR /&gt;Your statement "&lt;SPAN&gt;attribute "filename" that generated that executesql is "inherited" in all processors" is not accurate.&amp;nbsp; Processors do not inherit attributes.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;A NiFi FlowFile exists of two parts:&lt;BR /&gt;1. FlowFile attributes/metadata -- These FlowFile attributes reside in heap memory and are also stored in the flowfile_repository.&amp;nbsp; It is these attributes which "flow" from one processor component to another in you dataflow you build on the canvas. Processors then have access to these FlowFile Attributes when they execute against&amp;nbsp;a given FlowFile from the inbound connection.&amp;nbsp; Some processors as part of their execution will create additional attributes on a FlowFile before it is committed to the processor relationship that is assigned to a outbound connection.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. FlowFile Content -- The actual content of a FlowFile is written to a claim in the content_repository.&amp;nbsp; It is only access as needed by a processor.&amp;nbsp; It does not reside in heap memory unless a processor needs to do so to perform its function.&lt;BR /&gt;&lt;BR /&gt;These FlowFile attributes can be changed as your FlowFile passes through different processors, but they belong to the FlowFile and not the processors at all.&amp;nbsp; So there is nothing you need to "preserve/save" in most cases.&lt;BR /&gt;&lt;BR /&gt;Hope this adds some clarity,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2019 16:43:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Store-uuid-in-a-another-attribute/m-p/282240#M209862</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2019-11-06T16:43:11Z</dc:date>
    </item>
  </channel>
</rss>

