<?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 how to use File filter in GetFile processor at Nifi in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226614#M70166</link>
    <description>&lt;P&gt;I have lot of log files I need to get some specific file(based on date) for that I use regular expression in GetFile(file filter option).&lt;/P&gt;&lt;P&gt;I have file with name &lt;/P&gt;&lt;P&gt;nifi-app.log&lt;/P&gt;&lt;P&gt;nifi-app_2017-10-23_10.0.log&lt;/P&gt;&lt;P&gt;nifi-app_2017-10-23_20.0.log&lt;/P&gt;&lt;P&gt;nifi-setup.log&lt;/P&gt;&lt;P&gt;nifi-user_2017-10-06.log&lt;/P&gt;&lt;P&gt;In above files I need only nifi-app_2017* files only for I use regular expression &lt;STRONG&gt;".*app_2017\.log". &lt;/STRONG&gt;After I start flow in result no data is flowed. Can anyone help me whether my regular expression is correct or wrong?&lt;BR /&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 24 Oct 2017 18:19:26 GMT</pubDate>
    <dc:creator>narasimha_varma</dc:creator>
    <dc:date>2017-10-24T18:19:26Z</dc:date>
    <item>
      <title>how to use File filter in GetFile processor at Nifi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226614#M70166</link>
      <description>&lt;P&gt;I have lot of log files I need to get some specific file(based on date) for that I use regular expression in GetFile(file filter option).&lt;/P&gt;&lt;P&gt;I have file with name &lt;/P&gt;&lt;P&gt;nifi-app.log&lt;/P&gt;&lt;P&gt;nifi-app_2017-10-23_10.0.log&lt;/P&gt;&lt;P&gt;nifi-app_2017-10-23_20.0.log&lt;/P&gt;&lt;P&gt;nifi-setup.log&lt;/P&gt;&lt;P&gt;nifi-user_2017-10-06.log&lt;/P&gt;&lt;P&gt;In above files I need only nifi-app_2017* files only for I use regular expression &lt;STRONG&gt;".*app_2017\.log". &lt;/STRONG&gt;After I start flow in result no data is flowed. Can anyone help me whether my regular expression is correct or wrong?&lt;BR /&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 18:19:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226614#M70166</guid>
      <dc:creator>narasimha_varma</dc:creator>
      <dc:date>2017-10-24T18:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: how to use File filter in GetFile processor at Nifi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226615#M70167</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/14967/narasimhavarman.html" nodeid="14967"&gt;@Narasimma varman&lt;/A&gt;&lt;P&gt;If you change your regex to this  ".*app_2017.*\.log" it should match only the nifi-app_2017 log files.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Oct 2017 21:51:56 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226615#M70167</guid>
      <dc:creator>Wynner</dc:creator>
      <dc:date>2017-10-24T21:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: how to use File filter in GetFile processor at Nifi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226616#M70168</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/14967/narasimhavarman.html" nodeid="14967" target="_blank"&gt;@Narasimma varman&lt;/A&gt;
&lt;/P&gt;&lt;P&gt;if you want only &lt;STRONG&gt;nifi-app_2017&lt;/STRONG&gt; log files then&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Input Directory&lt;/STRONG&gt; property &lt;STRONG&gt;&amp;lt;directory-path&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;change the &lt;STRONG&gt;File Filter &lt;/STRONG&gt;property to&lt;/P&gt;&lt;PRE&gt;nifi-app_2017.*\.log&lt;/PRE&gt;&lt;P&gt;if you want any logs that having &lt;STRONG&gt;app_2017&lt;/STRONG&gt; in the &lt;STRONG&gt;filename&lt;/STRONG&gt; then use&lt;/P&gt;&lt;PRE&gt;.*app_2017.*\.log &lt;/PRE&gt;&lt;P&gt;Keep in mind get file processor is configured&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;KeepsourceFile&lt;/STRONG&gt; property is set to be &lt;STRONG&gt;false&lt;/STRONG&gt; by &lt;STRONG&gt;default&lt;/STRONG&gt;, once it pulls the files then it deletes them on the directory&lt;/P&gt;&lt;P&gt;If you don't want to delete the files from the directory then change property &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;KeepsourceFile to true &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;then the processor wont delete the files once they got pulled. &lt;/P&gt;&lt;P&gt;if you set &lt;STRONG&gt;Recursive SubDirectories&lt;/STRONG&gt; property to&lt;STRONG&gt; true &lt;/STRONG&gt;then&lt;STRONG&gt; make sure nifi&lt;/STRONG&gt; having access to your&lt;STRONG&gt; input Directory&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="41507-nifilog.png" style="width: 688px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15344iE3042802C10DD944/image-size/medium?v=v2&amp;amp;px=400" role="button" title="41507-nifilog.png" alt="41507-nifilog.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;in addition if you want to do any tailing on the logs then follow the below links to how to configure processors to tail the logs&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/141403/in-nifi-tailing-multiple-directories-with-the-same.html?childToView=141479#comment-141479" target="_blank" rel="nofollow noopener noreferrer"&gt;https://community.hortonworks.com/questions/141403/in-nifi-tailing-multiple-directories-with-the-same.html?childToView=141479#comment-141479&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.hortonworks.com/questions/141502/how-tailfile-works-with-multiple-files.html?childToView=141517#answer-141517" target="_blank" rel="nofollow noopener noreferrer"&gt;https://community.hortonworks.com/questions/141502/how-tailfile-works-with-multiple-files.html?childToView=141517#answer-141517&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 01:25:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226616#M70168</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T01:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: how to use File filter in GetFile processor at Nifi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226617#M70169</link>
      <description>&lt;P&gt;
	Why don`t you use a &lt;/P&gt;&lt;PRE&gt;	nifi-app_${now():format('yyyy-MM-dd')}_* &lt;/PRE&gt;&lt;P&gt;Where the output will be &lt;STRONG&gt;nifi-app_2017-10-25_*.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You can also use attributes for you log prefix and then you route on attribute based on the log type.&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 05:23:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226617#M70169</guid>
      <dc:creator>opreaadrian1</dc:creator>
      <dc:date>2017-10-25T05:23:57Z</dc:date>
    </item>
    <item>
      <title>Re: how to use File filter in GetFile processor at Nifi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226618#M70170</link>
      <description>&lt;P&gt;Thanks Shu I successfully got correct data&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 14:40:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226618#M70170</guid>
      <dc:creator>narasimha_varma</dc:creator>
      <dc:date>2017-10-25T14:40:03Z</dc:date>
    </item>
    <item>
      <title>Re: how to use File filter in GetFile processor at Nifi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226619#M70171</link>
      <description>&lt;P&gt;Thanks Wynner &lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 14:51:58 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226619#M70171</guid>
      <dc:creator>narasimha_varma</dc:creator>
      <dc:date>2017-10-25T14:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to use File filter in GetFile processor at Nifi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226620#M70172</link>
      <description>&lt;P&gt;Thanks Adrian Oprea&lt;/P&gt;</description>
      <pubDate>Wed, 25 Oct 2017 14:52:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/how-to-use-File-filter-in-GetFile-processor-at-Nifi/m-p/226620#M70172</guid>
      <dc:creator>narasimha_varma</dc:creator>
      <dc:date>2017-10-25T14:52:30Z</dc:date>
    </item>
  </channel>
</rss>

