<?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 prefix or suffix in NIFI tailFile Processor in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/prefix-or-suffix-in-NIFI-tailFile-Processor/m-p/192202#M68459</link>
    <description>&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;In my project I am using Nifi to read log file from tomcat and process those data in a spark application , after that insert those process data in DB. &lt;/P&gt;&lt;P&gt;But my problem is that , at app server level , I have 4 tomcat cluster(4 different log file) in 2 different box and I have mark out which data is from which cluster at spark level. In my present set up I have 2 tailFile processor in Nifi which pointing to single outport , in per box but not able to identify which data is from which cluster at spark level. &lt;/P&gt;&lt;P&gt;Is there any option in tailFile processor to add some suffix or prefix or file name(or any attribute) in each record ? so that I can identify each record is coming from which cluster and persist in db in that way? &lt;/P&gt;&lt;P&gt;Any help will be highly appreciated ....&lt;/P&gt;&lt;P&gt;Thanks in  advance &lt;/P&gt;</description>
    <pubDate>Fri, 22 Sep 2017 14:23:56 GMT</pubDate>
    <dc:creator>Biswajit16</dc:creator>
    <dc:date>2017-09-22T14:23:56Z</dc:date>
    <item>
      <title>prefix or suffix in NIFI tailFile Processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/prefix-or-suffix-in-NIFI-tailFile-Processor/m-p/192202#M68459</link>
      <description>&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;In my project I am using Nifi to read log file from tomcat and process those data in a spark application , after that insert those process data in DB. &lt;/P&gt;&lt;P&gt;But my problem is that , at app server level , I have 4 tomcat cluster(4 different log file) in 2 different box and I have mark out which data is from which cluster at spark level. In my present set up I have 2 tailFile processor in Nifi which pointing to single outport , in per box but not able to identify which data is from which cluster at spark level. &lt;/P&gt;&lt;P&gt;Is there any option in tailFile processor to add some suffix or prefix or file name(or any attribute) in each record ? so that I can identify each record is coming from which cluster and persist in db in that way? &lt;/P&gt;&lt;P&gt;Any help will be highly appreciated ....&lt;/P&gt;&lt;P&gt;Thanks in  advance &lt;/P&gt;</description>
      <pubDate>Fri, 22 Sep 2017 14:23:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/prefix-or-suffix-in-NIFI-tailFile-Processor/m-p/192202#M68459</guid>
      <dc:creator>Biswajit16</dc:creator>
      <dc:date>2017-09-22T14:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: prefix or suffix in NIFI tailFile Processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/prefix-or-suffix-in-NIFI-tailFile-Processor/m-p/192203#M68460</link>
      <description>&lt;P&gt; &lt;A rel="user" href="https://community.cloudera.com/users/11492/biswajit2015in.html" nodeid="11492" target="_blank"&gt;@Biswajit Chakraborty&lt;/A&gt;&lt;/P&gt;&lt;P&gt;A simple way to do this is to use a ReplaceText processor after the TailFile.&lt;/P&gt;&lt;P&gt;ReplaceText gives you the option to configure which Replacement Strategy to use. Using 'Prepend' will insert the replacement value at the start of each file or line (depending on what you've configured 'Evaluation Mode' to be):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="39465-nifi-replace-text-strategy.png" style="width: 1554px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/18328i35527728F1982EE7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="39465-nifi-replace-text-strategy.png" alt="39465-nifi-replace-text-strategy.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So a ReplaceText with the following configs will give you what you need:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;B&gt;Replacement Value&lt;/B&gt;&lt;STRONG&gt;:&lt;/STRONG&gt;  &amp;lt;set your hostname or filename&amp;gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Replacement Strategy:&lt;/STRONG&gt;  Prepend&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Evaluation Mode:&lt;/STRONG&gt;   Line-by-Line&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Sun, 18 Aug 2019 07:15:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/prefix-or-suffix-in-NIFI-tailFile-Processor/m-p/192203#M68460</guid>
      <dc:creator>ldaluz</dc:creator>
      <dc:date>2019-08-18T07:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: prefix or suffix in NIFI tailFile Processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/prefix-or-suffix-in-NIFI-tailFile-Processor/m-p/192204#M68461</link>
      <description>&lt;P&gt;Thanks a lot for your help , you saved my day ... thanks again .....&lt;/P&gt;</description>
      <pubDate>Sun, 24 Sep 2017 00:17:06 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/prefix-or-suffix-in-NIFI-tailFile-Processor/m-p/192204#M68461</guid>
      <dc:creator>Biswajit16</dc:creator>
      <dc:date>2017-09-24T00:17:06Z</dc:date>
    </item>
  </channel>
</rss>

