<?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: Apache Nifi - Adding attributes as newlines FlowFilw content in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/161005#M123390</link>
    <description>&lt;P&gt;yeah thanks.. append works.. \\n (double backslash) doesnt.. I was doing this while writing count to file.. it now works.. The count is: ${executesql.row.count:append('\n')}&lt;/P&gt;</description>
    <pubDate>Fri, 02 Dec 2016 20:06:40 GMT</pubDate>
    <dc:creator>anubhav_r_raika</dc:creator>
    <dc:date>2016-12-02T20:06:40Z</dc:date>
    <item>
      <title>Apache Nifi - Adding attributes as newlines FlowFilw content</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/160999#M123384</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a scenario where My GetHTTP processor gets a JSON of system health metrics. I extract the attributes from the Json to essentially extract the desired metrics that I want to display on a Graph.&lt;/P&gt;&lt;P&gt;Input: Suppose following attributes I extracted from Json using EvaluateJSONPath processor:&lt;/P&gt;&lt;P&gt;metric1='&amp;lt;myconmapy&amp;gt;.&amp;lt;metric1&amp;gt;  &amp;lt;value&amp;gt;  &amp;lt;timestamp&amp;gt;'&lt;/P&gt;&lt;P&gt;metric2='&amp;lt;myconmapy&amp;gt;.&amp;lt;metric2&amp;gt;  &amp;lt;value&amp;gt;  &amp;lt;timestamp&amp;gt;'&lt;/P&gt;&lt;P&gt;metric3='&amp;lt;myconmapy&amp;gt;.&amp;lt;metric3&amp;gt;  &amp;lt;value&amp;gt;  &amp;lt;timestamp&amp;gt;'&lt;/P&gt;&lt;P&gt;Output: I want to convert all the above mentioned attributes/metrics as lines of FlowFile content, such that one FlowFile content will look like following (each line contains an attribute value):&lt;/P&gt;&lt;P&gt;&amp;lt;myconmapy&amp;gt;.&amp;lt;metric1&amp;gt;  &amp;lt;value&amp;gt;  &amp;lt;timestamp&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;myconmapy&amp;gt;.&amp;lt;metric2&amp;gt; &amp;lt;value&amp;gt; &amp;lt;timestamp&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;myconmapy&amp;gt;.&amp;lt;metric3&amp;gt; &amp;lt;value&amp;gt; &amp;lt;timestamp&amp;gt;&lt;/P&gt;&lt;P&gt;Is there a way to achieve the above mentioned Output using Nifi processors? &lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 21:57:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/160999#M123384</guid>
      <dc:creator>obaid_salikeen</dc:creator>
      <dc:date>2016-08-02T21:57:01Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi - Adding attributes as newlines FlowFilw content</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/161000#M123385</link>
      <description>&lt;P&gt;Yes, use a ReplaceText processor and NiFi's Expression Language syntax to reference your attributes and construct the content line. Tip: switch the evaluation mode for ReplaceText to 'Always Replace' as an optimization for your use case.&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.ReplaceText/index.html"&gt;https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.ReplaceText/index.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html"&gt;https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 22:05:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/161000#M123385</guid>
      <dc:creator>andrewg</dc:creator>
      <dc:date>2016-08-02T22:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi - Adding attributes as newlines FlowFilw content</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/161001#M123386</link>
      <description>&lt;P&gt;Awesome, I solved it by using the append('\n') for attribute:&lt;/P&gt;&lt;P&gt;${m1:append('\n')}${m2:append('\n')}${m3} &lt;/P&gt;&lt;P&gt;Thanks a lot,&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2016 22:13:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/161001#M123386</guid>
      <dc:creator>obaid_salikeen</dc:creator>
      <dc:date>2016-08-02T22:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi - Adding attributes as newlines FlowFilw content</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/161002#M123387</link>
      <description>&lt;P&gt;When entering text values into NiFi you should be able to hit "Shift-Enter" and it will give you true new lines.  See attached screenshot&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="6264-screen-shot-2016-08-02-at-112410-am.png" style="width: 1770px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20698i4C350F5E74CDBED5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="6264-screen-shot-2016-08-02-at-112410-am.png" alt="6264-screen-shot-2016-08-02-at-112410-am.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 11:56:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/161002#M123387</guid>
      <dc:creator>JoeWitt</dc:creator>
      <dc:date>2019-08-18T11:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi - Adding attributes as newlines FlowFilw content</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/161003#M123388</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/12076/obaidsalikeen.html" nodeid="12076"&gt;@Obaid Salikeen&lt;/A&gt;&lt;P&gt;Try using \\n (double backslash) or using 'Shift + enter" in the expression language editor box to create new lines in your replacement string as shown by Joe Witt above.

Thanks,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Wed, 03 Aug 2016 00:48:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/161003#M123388</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2016-08-03T00:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi - Adding attributes as newlines FlowFilw content</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/161004#M123389</link>
      <description>&lt;P&gt;Joe - What processor is being illustrated?&lt;/P&gt;</description>
      <pubDate>Fri, 18 Nov 2016 23:27:12 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/161004#M123389</guid>
      <dc:creator>jthomas_t_king</dc:creator>
      <dc:date>2016-11-18T23:27:12Z</dc:date>
    </item>
    <item>
      <title>Re: Apache Nifi - Adding attributes as newlines FlowFilw content</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/161005#M123390</link>
      <description>&lt;P&gt;yeah thanks.. append works.. \\n (double backslash) doesnt.. I was doing this while writing count to file.. it now works.. The count is: ${executesql.row.count:append('\n')}&lt;/P&gt;</description>
      <pubDate>Fri, 02 Dec 2016 20:06:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Apache-Nifi-Adding-attributes-as-newlines-FlowFilw-content/m-p/161005#M123390</guid>
      <dc:creator>anubhav_r_raika</dc:creator>
      <dc:date>2016-12-02T20:06:40Z</dc:date>
    </item>
  </channel>
</rss>

