<?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: append an attribute to flowfile content at the end in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/append-an-attribute-to-flowfile-content-at-the-end/m-p/371608#M241023</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71250"&gt;@SandyClouds&lt;/a&gt;&amp;nbsp;If you don't care about the specific formatting of the FlowFiles content, you could use the &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.21.0/org.apache.nifi.processors.standard.ReplaceText/index.html" target="_self"&gt;ReplaceText&lt;/A&gt; processor to append test to the end of the existing content.&amp;nbsp; I am assuming that you are manually investigating the failure later and will simply remove the appended&amp;nbsp;&lt;SPAN&gt;putdatabaserecord.error text during the evaluation.&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;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 26 May 2023 15:01:56 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2023-05-26T15:01:56Z</dc:date>
    <item>
      <title>append an attribute to flowfile content at the end</title>
      <link>https://community.cloudera.com/t5/Support-Questions/append-an-attribute-to-flowfile-content-at-the-end/m-p/371541#M241007</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using putdatabaserecord to store a value into DB.&lt;/P&gt;&lt;P&gt;Now i have a flow based on failure link to (this processor), that this failed record will be stored in disc for troubleshooting.&lt;/P&gt;&lt;P&gt;I can store the failed record in disc by using putfile processor.&lt;/P&gt;&lt;P&gt;Now i wanted it more informative during debugging, as the attribute "putdatabaserecord.error" contains the error reason, i want to append the flowfile content with this error reason.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I tried to acheive this using below flow..&lt;/P&gt;&lt;P&gt;putsql/putdbrecord -&amp;gt; failure-&amp;gt; updateattribute (this is to give the flowfile a realistic name)-&amp;gt; attributesToJson (destination flowfileattribute/content -&amp;gt; putfile&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SandyClouds_0-1685028702216.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/37661iAF711893444D59D8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SandyClouds_0-1685028702216.png" alt="SandyClouds_0-1685028702216.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;but in attributestoJson , if the destination is kept as flowfileattribute, the flowfile dont get this attribute or if it is kept as flowfile content, original flowfile content is replaced...&lt;/P&gt;&lt;P&gt;My requirement is to append this single attribute to the existing flowfile content.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help or suggestion is greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 15:36:17 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/append-an-attribute-to-flowfile-content-at-the-end/m-p/371541#M241007</guid>
      <dc:creator>SandyClouds</dc:creator>
      <dc:date>2023-05-25T15:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: append an attribute to flowfile content at the end</title>
      <link>https://community.cloudera.com/t5/Support-Questions/append-an-attribute-to-flowfile-content-at-the-end/m-p/371556#M241012</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What is the format of the original flowfile content after PutDatabaseRecord\PUTSQL? if its something like xml or json you can use queryrecord processor or jolt transformation to enrich the content from the attributes.&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 20:48:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/append-an-attribute-to-flowfile-content-at-the-end/m-p/371556#M241012</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2023-05-25T20:48:40Z</dc:date>
    </item>
    <item>
      <title>Re: append an attribute to flowfile content at the end</title>
      <link>https://community.cloudera.com/t5/Support-Questions/append-an-attribute-to-flowfile-content-at-the-end/m-p/371608#M241023</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71250"&gt;@SandyClouds&lt;/a&gt;&amp;nbsp;If you don't care about the specific formatting of the FlowFiles content, you could use the &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.21.0/org.apache.nifi.processors.standard.ReplaceText/index.html" target="_self"&gt;ReplaceText&lt;/A&gt; processor to append test to the end of the existing content.&amp;nbsp; I am assuming that you are manually investigating the failure later and will simply remove the appended&amp;nbsp;&lt;SPAN&gt;putdatabaserecord.error text during the evaluation.&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;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 15:01:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/append-an-attribute-to-flowfile-content-at-the-end/m-p/371608#M241023</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2023-05-26T15:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: append an attribute to flowfile content at the end</title>
      <link>https://community.cloudera.com/t5/Support-Questions/append-an-attribute-to-flowfile-content-at-the-end/m-p/371612#M241026</link>
      <description>&lt;P&gt;Thank You&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp; for your wonderful suggestions.&lt;/P&gt;&lt;P&gt;I achieved solution using JolttransformJSON processor, where i used below jolt specification&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[{&lt;BR /&gt;"operation": "default",&lt;BR /&gt;"spec": {&lt;BR /&gt;"*": {&lt;BR /&gt;"error": "${putdatabaserecord.error}"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}]&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for your thought provoking answers..&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2023 15:40:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/append-an-attribute-to-flowfile-content-at-the-end/m-p/371612#M241026</guid>
      <dc:creator>SandyClouds</dc:creator>
      <dc:date>2023-05-26T15:40:24Z</dc:date>
    </item>
  </channel>
</rss>

