<?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 - How to Write a Flowfile Attribute to a File in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104316#M67213</link>
    <description>&lt;P&gt;I have an XML file which I send to an EvaluateXPath processor. The destination of the EvaluateXPath is flowfile-attribute, and it has one user-defined property with the XPath. I can see that that the attribute has the correct value. Now I would like to write the contents of this attribute to a file on the file system. Does anyone know how to do this?&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;</description>
    <pubDate>Fri, 30 Dec 2016 01:07:09 GMT</pubDate>
    <dc:creator>lambkl</dc:creator>
    <dc:date>2016-12-30T01:07:09Z</dc:date>
    <item>
      <title>NiFi - How to Write a Flowfile Attribute to a File</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104316#M67213</link>
      <description>&lt;P&gt;I have an XML file which I send to an EvaluateXPath processor. The destination of the EvaluateXPath is flowfile-attribute, and it has one user-defined property with the XPath. I can see that that the attribute has the correct value. Now I would like to write the contents of this attribute to a file on the file system. Does anyone know how to do this?&lt;/P&gt;&lt;P&gt;,&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2016 01:07:09 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104316#M67213</guid>
      <dc:creator>lambkl</dc:creator>
      <dc:date>2016-12-30T01:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi - How to Write a Flowfile Attribute to a File</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104317#M67214</link>
      <description>&lt;P&gt;Hi Karri,&lt;/P&gt;&lt;P&gt;The simplest way to do it to convert your attributes to json and then store it. you can use AttributesToJSON processor:&lt;/P&gt;&lt;P&gt;&lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.AttributesToJSON/index.html" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.AttributesToJSON/index.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jobin&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2016 01:19:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104317#M67214</guid>
      <dc:creator>jgeorge</dc:creator>
      <dc:date>2016-12-30T01:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi - How to Write a Flowfile Attribute to a File</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104318#M67215</link>
      <description>&lt;P&gt;It would be much easier if you could set the Destination of EvaluateXPath to "flowfile-content". Are you able to do that? 

If so, do that and then you can do "PutFile" to write the content of the FlowFile to the FileSystem.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2016 01:19:28 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104318#M67215</guid>
      <dc:creator>jpercivall</dc:creator>
      <dc:date>2016-12-30T01:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi - How to Write a Flowfile Attribute to a File</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104319#M67216</link>
      <description>&lt;P&gt;I don't agree with this answer. All AttributesToJSON would do is wrap the attribute in a JSON object and either put it to another attribute or replace the content. If the user is OK with replacing the content then EvaluateXPath with a destination of "flowfile-content" would be the best. Also it ignores the core question, how to put the value generated by EvaluateXPath to disk.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2016 01:28:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104319#M67216</guid>
      <dc:creator>jpercivall</dc:creator>
      <dc:date>2016-12-30T01:28:48Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi - How to Write a Flowfile Attribute to a File</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104320#M67217</link>
      <description>&lt;P&gt;Agreed. But Does EvaluateXPath --&amp;gt; save to flowFile Content give you an option at all to deal with original incoming file? Something like below would do both i guess. &lt;/P&gt;&lt;P&gt;EvaluateXpath(Set to Attributes) [match]--&amp;gt; PutFile/DoSomethingElse&lt;/P&gt;&lt;P&gt;EvaluateXpath(Set to Attributes) [match]--&amp;gt; AttributesToJSON--&amp;gt;PutFIle(AttributesAsContent)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="10933-screen-shot-2016-12-29-at-115209-am.png" style="width: 2108px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/23616i17661A360E71D2B0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="10933-screen-shot-2016-12-29-at-115209-am.png" alt="10933-screen-shot-2016-12-29-at-115209-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any suggestion/better way to make it better?&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2019 12:03:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104320#M67217</guid>
      <dc:creator>jgeorge</dc:creator>
      <dc:date>2019-08-19T12:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi - How to Write a Flowfile Attribute to a File</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104321#M67218</link>
      <description>&lt;P&gt;Thanks. I got this to work using the AttributesToJSON processor.&lt;/P&gt;</description>
      <pubDate>Fri, 30 Dec 2016 04:14:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104321#M67218</guid>
      <dc:creator>lambkl</dc:creator>
      <dc:date>2016-12-30T04:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi - How to Write a Flowfile Attribute to a File</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104322#M67219</link>
      <description>&lt;P&gt;how do you get the AttributesAsContent in the PutFile processor?&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 02:59:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104322#M67219</guid>
      <dc:creator>broderick_ellis</dc:creator>
      <dc:date>2017-08-17T02:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi - How to Write a Flowfile Attribute to a File</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104323#M67220</link>
      <description>&lt;P&gt;You can use replacetext processor and in  place of replacement use the attribute name you want to have in your flow file.&lt;/P&gt;&lt;P&gt;One thing you must keep in mind that attributes are stored in memory.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2019 19:00:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-How-to-Write-a-Flowfile-Attribute-to-a-File/m-p/104323#M67220</guid>
      <dc:creator>rupeshrp_agarwa</dc:creator>
      <dc:date>2019-04-26T19:00:37Z</dc:date>
    </item>
  </channel>
</rss>

