<?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: How to add customer headers to csv file in NIFI in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-add-customer-headers-to-csv-file-in-NIFI/m-p/285806#M212038</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71673"&gt;@saciya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure why this is not working for you.&lt;BR /&gt;&lt;BR /&gt;I built a test flow and it is working fine for me.&lt;BR /&gt;Here is how I have my ReplaceText processor component configured:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-12-17 at 9.56.21 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/25751i7141A3FE1A595E44/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-12-17 at 9.56.21 AM.png" alt="Screen Shot 2019-12-17 at 9.56.21 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I also used "shift+enter" to create a new line at the end of the header being inserted (note that a blank line "2" is shown) and the "Prepend" replacement strategy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I passed it the following test CSV content:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;15-Dec-19,Baltimore,27
17-Dec-19,Baltimore,34&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then listed the queue on the success relationship connection outbound from the ReplaceText processor.&amp;nbsp; From there I could click on "View Details" icon to far left of my FlowFile in the queue list and then click "VIEW' to see what the resulting content looked like.&lt;BR /&gt;&lt;BR /&gt;Here is what I see for my sample source content above:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-12-17 at 10.02.54 AM.png" style="width: 411px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/25752i72ABF7F90997864E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-12-17 at 10.02.54 AM.png" alt="Screen Shot 2019-12-17 at 10.02.54 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Apache NiFi 1.9&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Matt&lt;/P&gt;</description>
    <pubDate>Tue, 17 Dec 2019 15:04:53 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2019-12-17T15:04:53Z</dc:date>
    <item>
      <title>How to add customer headers to csv file in NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-add-customer-headers-to-csv-file-in-NIFI/m-p/285457#M211843</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to add headers to a csv file.&amp;nbsp;I have used&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Replace text&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;processor for this purpose.&lt;/P&gt;
&lt;P&gt;But final output just append headers to the first line.&lt;/P&gt;
&lt;P&gt;eg:&lt;/P&gt;
&lt;P&gt;Sample :&lt;/P&gt;
&lt;PRE&gt;2-Dec-15,Mumbai,120&lt;/PRE&gt;
&lt;P&gt;Expected output :&lt;/P&gt;
&lt;PRE&gt;date,city,temp
2-Dec-15,Mumbai,120&lt;/PRE&gt;
&lt;P&gt;Output :&lt;/P&gt;
&lt;PRE&gt;date,city,temp2-Dec-15,Mumbai,120&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I have tried both ways by adding '\n' and 'shift+enter' after the header line&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; id,name,site,score\n&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;id,name,site,scoreshift+enter&amp;nbsp;&lt;/STRONG&gt;as the replacement value,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;but no luck instead \n and shift+enter was taken as a value.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Could anyone help to resolve this issue.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Dec 2019 14:02:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-add-customer-headers-to-csv-file-in-NIFI/m-p/285457#M211843</guid>
      <dc:creator>saciya</dc:creator>
      <dc:date>2019-12-12T14:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to add customer headers to csv file in NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-add-customer-headers-to-csv-file-in-NIFI/m-p/285806#M212038</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/71673"&gt;@saciya&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure why this is not working for you.&lt;BR /&gt;&lt;BR /&gt;I built a test flow and it is working fine for me.&lt;BR /&gt;Here is how I have my ReplaceText processor component configured:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-12-17 at 9.56.21 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/25751i7141A3FE1A595E44/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-12-17 at 9.56.21 AM.png" alt="Screen Shot 2019-12-17 at 9.56.21 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I also used "shift+enter" to create a new line at the end of the header being inserted (note that a blank line "2" is shown) and the "Prepend" replacement strategy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I passed it the following test CSV content:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;15-Dec-19,Baltimore,27
17-Dec-19,Baltimore,34&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then listed the queue on the success relationship connection outbound from the ReplaceText processor.&amp;nbsp; From there I could click on "View Details" icon to far left of my FlowFile in the queue list and then click "VIEW' to see what the resulting content looked like.&lt;BR /&gt;&lt;BR /&gt;Here is what I see for my sample source content above:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-12-17 at 10.02.54 AM.png" style="width: 411px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/25752i72ABF7F90997864E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-12-17 at 10.02.54 AM.png" alt="Screen Shot 2019-12-17 at 10.02.54 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using Apache NiFi 1.9&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;BR /&gt;Matt&lt;/P&gt;</description>
      <pubDate>Tue, 17 Dec 2019 15:04:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-add-customer-headers-to-csv-file-in-NIFI/m-p/285806#M212038</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2019-12-17T15:04:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to add customer headers to csv file in NIFI</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-add-customer-headers-to-csv-file-in-NIFI/m-p/285867#M212057</link>
      <description>&lt;P&gt;Thanks Matt for the quick response.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2019 04:51:44 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-add-customer-headers-to-csv-file-in-NIFI/m-p/285867#M212057</guid>
      <dc:creator>saciya</dc:creator>
      <dc:date>2019-12-18T04:51:44Z</dc:date>
    </item>
  </channel>
</rss>

