<?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: Need info on Regex to be used in NiFi ListFile processor in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Need-info-on-Regex-to-be-used-in-NiFi-ListFile-processor/m-p/289041#M213998</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;I tried the regex, but it picks the file which is present under DIR3 also. Below is my configuration,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ListFile.PNG" style="width: 763px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/26271i91183A0B177665A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="ListFile.PNG" alt="ListFile.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Feb 2020 05:14:50 GMT</pubDate>
    <dc:creator>Rohitravi</dc:creator>
    <dc:date>2020-02-04T05:14:50Z</dc:date>
    <item>
      <title>Need info on Regex to be used in NiFi ListFile processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Need-info-on-Regex-to-be-used-in-NiFi-ListFile-processor/m-p/288969#M213951</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;I have directory structure like below on Unix file system,&lt;BR /&gt;/DIR1/DIR2/DIR3/DIR4/DIR5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have files under the directories DIR3 &amp;amp; DIR5. However I want to read files only from DIR5.&lt;BR /&gt;I tried with various regex but could not get the right one&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;
&lt;P&gt;Could you please help me with the Regex to be used in ListFile processor to read files from DIR5 only.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in Advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 13:45:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Need-info-on-Regex-to-be-used-in-NiFi-ListFile-processor/m-p/288969#M213951</guid>
      <dc:creator>Rohitravi</dc:creator>
      <dc:date>2020-02-03T13:45:00Z</dc:date>
    </item>
    <item>
      <title>Re: Need info on Regex to be used in NiFi ListFile processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Need-info-on-Regex-to-be-used-in-NiFi-ListFile-processor/m-p/289022#M213988</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/70552"&gt;@Rohitravi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you only want to list files from directory DIR5, simply provide the complete path to DIR5 in the "Input Directory" ListFile processor configuration property and set Recurse Subdirectories as false.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If above is not an option, you may want to try using the following "Path Filter":&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;.*?/DIR5&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Mon, 03 Feb 2020 22:17:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Need-info-on-Regex-to-be-used-in-NiFi-ListFile-processor/m-p/289022#M213988</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2020-02-03T22:17:52Z</dc:date>
    </item>
    <item>
      <title>Re: Need info on Regex to be used in NiFi ListFile processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Need-info-on-Regex-to-be-used-in-NiFi-ListFile-processor/m-p/289041#M213998</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi Matt,&lt;/P&gt;&lt;P&gt;Thanks for your response.&lt;/P&gt;&lt;P&gt;I tried the regex, but it picks the file which is present under DIR3 also. Below is my configuration,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ListFile.PNG" style="width: 763px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/26271i91183A0B177665A5/image-size/large?v=v2&amp;amp;px=999" role="button" title="ListFile.PNG" alt="ListFile.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 05:14:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Need-info-on-Regex-to-be-used-in-NiFi-ListFile-processor/m-p/289041#M213998</guid>
      <dc:creator>Rohitravi</dc:creator>
      <dc:date>2020-02-04T05:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Need info on Regex to be used in NiFi ListFile processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Need-info-on-Regex-to-be-used-in-NiFi-ListFile-processor/m-p/289110#M214055</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/70552"&gt;@Rohitravi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Path Filter is applied against all subdirectories of the configured "Input Directory".&amp;nbsp; Any files found in the base "Input Directory" are still going to be listed.&amp;nbsp; If you had files in "dir4", they should not have been listed.&lt;BR /&gt;&lt;BR /&gt;Is dir2 empty?&amp;nbsp; If so can you change your "Input Directory" to /dir1/dir2 instead of /dir1/dir2/dir3.&lt;BR /&gt;&lt;BR /&gt;I cannot think of a reason why when filtering based on subdir path that you would still expect to returns from the base directory, so I filed an Apache jira (&amp;nbsp;&lt;A href="https://issues.apache.org/jira/browse/NIFI-7104" target="_blank"&gt;https://issues.apache.org/jira/browse/NIFI-7104&lt;/A&gt; ).&lt;BR /&gt;&lt;BR /&gt;Another option is to add a RouteOnAttribute processor after your listFile processor to route on only FlowFile where the absolute.path FlowFile attribute included "dir5".&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2020-02-04 at 3.40.30 PM.png" style="width: 679px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/26275i7882BC7F85E4924E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-02-04 at 3.40.30 PM.png" alt="Screen Shot 2020-02-04 at 3.40.30 PM.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Then auto-terminate the unmatched relationship and route the "dir5" relationship on to the next component in your dataflow.&lt;BR /&gt;&lt;BR /&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Matt&lt;BR /&gt;&lt;BR /&gt;If you found this solution resolves your query, please take a moment to click accept.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Feb 2020 20:43:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Need-info-on-Regex-to-be-used-in-NiFi-ListFile-processor/m-p/289110#M214055</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2020-02-04T20:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: Need info on Regex to be used in NiFi ListFile processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Need-info-on-Regex-to-be-used-in-NiFi-ListFile-processor/m-p/289124#M214063</link>
      <description>&lt;P&gt;Thanks a lot Matt!!&lt;/P&gt;</description>
      <pubDate>Wed, 05 Feb 2020 04:34:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Need-info-on-Regex-to-be-used-in-NiFi-ListFile-processor/m-p/289124#M214063</guid>
      <dc:creator>Rohitravi</dc:creator>
      <dc:date>2020-02-05T04:34:49Z</dc:date>
    </item>
  </channel>
</rss>

