<?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 NiFi GetHTTP processor's uuid attribute in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-GetHTTP-processor-s-uuid-attribute/m-p/100775#M63777</link>
    <description>&lt;P&gt;I'm using nifi-1.1.0.0-10 and trying to save the output of a URL to a unique filename using GetHTTP processor.  There is a 'Filename' property that supports expression language, but &lt;EM&gt;${uuid}&lt;/EM&gt; does not seem to work like other variables.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;./downloads/${uuid}&lt;/EM&gt; evaluates to ./downloads/&lt;/P&gt;&lt;P&gt;while&lt;/P&gt;&lt;P&gt;&lt;EM&gt;./downloads/${UUID()}&lt;/EM&gt; evaluates to ./downloads/40b08a2c-de4f-4504-ac86-1743b59a3810/&lt;/P&gt;&lt;P&gt;is &lt;EM&gt;${uuid}&lt;/EM&gt; a special attribute that cannot be used in 'FIlename' inside of GetHTTP processor?&lt;/P&gt;</description>
    <pubDate>Sat, 26 Dec 2015 04:20:00 GMT</pubDate>
    <dc:creator>vzlatkin</dc:creator>
    <dc:date>2015-12-26T04:20:00Z</dc:date>
    <item>
      <title>NiFi GetHTTP processor's uuid attribute</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-GetHTTP-processor-s-uuid-attribute/m-p/100775#M63777</link>
      <description>&lt;P&gt;I'm using nifi-1.1.0.0-10 and trying to save the output of a URL to a unique filename using GetHTTP processor.  There is a 'Filename' property that supports expression language, but &lt;EM&gt;${uuid}&lt;/EM&gt; does not seem to work like other variables.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;./downloads/${uuid}&lt;/EM&gt; evaluates to ./downloads/&lt;/P&gt;&lt;P&gt;while&lt;/P&gt;&lt;P&gt;&lt;EM&gt;./downloads/${UUID()}&lt;/EM&gt; evaluates to ./downloads/40b08a2c-de4f-4504-ac86-1743b59a3810/&lt;/P&gt;&lt;P&gt;is &lt;EM&gt;${uuid}&lt;/EM&gt; a special attribute that cannot be used in 'FIlename' inside of GetHTTP processor?&lt;/P&gt;</description>
      <pubDate>Sat, 26 Dec 2015 04:20:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-GetHTTP-processor-s-uuid-attribute/m-p/100775#M63777</guid>
      <dc:creator>vzlatkin</dc:creator>
      <dc:date>2015-12-26T04:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi GetHTTP processor's uuid attribute</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-GetHTTP-processor-s-uuid-attribute/m-p/100776#M63778</link>
      <description>&lt;P&gt;Vlad, I think there's a misunderstanding here. See if I understood the problem below.&lt;/P&gt;&lt;P&gt;In the GetHTTP the Filename is something you assign. You can use an expression, but that also means that you must invoke the &lt;STRONG&gt;UUID()&lt;/STRONG&gt; function to generate the id. It doesn't exist yet.&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;${uuid}&lt;/STRONG&gt; syntax &lt;EM&gt;reads&lt;/EM&gt; an existing UUID. It will work down the line in your data flow, but it will &lt;EM&gt;not &lt;/EM&gt;generate any id for you.&lt;/P&gt;&lt;P&gt;In your case, it is correct to use the &lt;STRONG&gt;UUID()&lt;/STRONG&gt; function.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Dec 2015 02:56:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-GetHTTP-processor-s-uuid-attribute/m-p/100776#M63778</guid>
      <dc:creator>andrewg</dc:creator>
      <dc:date>2015-12-27T02:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi GetHTTP processor's uuid attribute</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-GetHTTP-processor-s-uuid-attribute/m-p/100777#M63779</link>
      <description>&lt;P&gt;
	Andrew is correct in regards to the difference between ${uuid} and ${UUID()} but the reason why ${uuid} doesn't work is because the GetHTTP processor doesn't evaluate the expression language in relation to the new flowfile.&lt;/P&gt;&lt;P&gt;
	As you can see on this line: &lt;A target="_blank" href="https://github.com/apache/nifi/blob/528dab78d6dbc3bb4f61663f423b07284936ec40/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java#L476"&gt;https://github.com/apache/nifi/blob/528dab78d6dbc3bb4f61663f423b07284936ec40/nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GetHTTP.java#L476&lt;/A&gt;&lt;/P&gt;&lt;P&gt;
	It calls "evaluateAttributeExpressions()" with no parameters so the "uuid" of the new flowfile is outside the scope of the expression language when being evaluated. If you want to re-use the UUID for the FlowFile you can use an UpdateAttribute processor to append the UUID to "&lt;EM&gt;./downloads/".&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Dec 2015 08:57:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-GetHTTP-processor-s-uuid-attribute/m-p/100777#M63779</guid>
      <dc:creator>jpercivall</dc:creator>
      <dc:date>2015-12-28T08:57:53Z</dc:date>
    </item>
  </channel>
</rss>

