<?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 NiFi ListFile/ListSFTP + FetchFile/FetchSFTP issue in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-ListFile-ListSFTP-FetchFile-FetchSFTP-issue/m-p/394015#M248641</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using NiFi 1.26.0 and having a flow with combination of ListFile and FetchFile.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VikasNifi_5-1727346006280.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/41886iBCB72F8D615BE7D1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VikasNifi_5-1727346006280.png" alt="VikasNifi_5-1727346006280.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Basically i have three files in my local directory (test_1.txt, test_2.txt,test_3.txt). I have to fetch only one file (ex:test_1.txt) for further process.&lt;/P&gt;&lt;P&gt;Based on regex listFile list's all three files.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VikasNifi_0-1727345336201.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/41881i7EB47B4258534696/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VikasNifi_0-1727345336201.png" alt="VikasNifi_0-1727345336201.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VikasNifi_1-1727345369148.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/41882i7D47BBD793D83ED9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VikasNifi_1-1727345369148.png" alt="VikasNifi_1-1727345369148.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But facing issue in fetch file. Instead of fetching only one file, it tried to fetch all three files listed by listFile processor&amp;nbsp; and giving output as three files instead of one file, but content of all three files are same as content of file mentioned in fetchFile configuration (test_1.txt)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VikasNifi_2-1727345636943.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/41883iE2F63585BBC7D557/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VikasNifi_2-1727345636943.png" alt="VikasNifi_2-1727345636943.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VikasNifi_3-1727345668358.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/41884i2F442951734618C6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VikasNifi_3-1727345668358.png" alt="VikasNifi_3-1727345668358.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In data provenance could see it is trying to fetch the files which is not mentioned in fetchFile configuration and after fetching the files it modifies the content.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VikasNifi_4-1727345959532.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/41885iEDA93FB6612363F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VikasNifi_4-1727345959532.png" alt="VikasNifi_4-1727345959532.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can i fix this. Please help.&lt;/P&gt;</description>
    <pubDate>Thu, 26 Sep 2024 10:22:19 GMT</pubDate>
    <dc:creator>Vikas-Nifi</dc:creator>
    <dc:date>2024-09-26T10:22:19Z</dc:date>
    <item>
      <title>NiFi ListFile/ListSFTP + FetchFile/FetchSFTP issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-ListFile-ListSFTP-FetchFile-FetchSFTP-issue/m-p/394015#M248641</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using NiFi 1.26.0 and having a flow with combination of ListFile and FetchFile.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VikasNifi_5-1727346006280.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/41886iBCB72F8D615BE7D1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VikasNifi_5-1727346006280.png" alt="VikasNifi_5-1727346006280.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Basically i have three files in my local directory (test_1.txt, test_2.txt,test_3.txt). I have to fetch only one file (ex:test_1.txt) for further process.&lt;/P&gt;&lt;P&gt;Based on regex listFile list's all three files.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VikasNifi_0-1727345336201.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/41881i7EB47B4258534696/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VikasNifi_0-1727345336201.png" alt="VikasNifi_0-1727345336201.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VikasNifi_1-1727345369148.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/41882i7D47BBD793D83ED9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VikasNifi_1-1727345369148.png" alt="VikasNifi_1-1727345369148.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But facing issue in fetch file. Instead of fetching only one file, it tried to fetch all three files listed by listFile processor&amp;nbsp; and giving output as three files instead of one file, but content of all three files are same as content of file mentioned in fetchFile configuration (test_1.txt)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VikasNifi_2-1727345636943.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/41883iE2F63585BBC7D557/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VikasNifi_2-1727345636943.png" alt="VikasNifi_2-1727345636943.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VikasNifi_3-1727345668358.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/41884i2F442951734618C6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VikasNifi_3-1727345668358.png" alt="VikasNifi_3-1727345668358.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In data provenance could see it is trying to fetch the files which is not mentioned in fetchFile configuration and after fetching the files it modifies the content.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="VikasNifi_4-1727345959532.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/41885iEDA93FB6612363F9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="VikasNifi_4-1727345959532.png" alt="VikasNifi_4-1727345959532.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;How can i fix this. Please help.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 10:22:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-ListFile-ListSFTP-FetchFile-FetchSFTP-issue/m-p/394015#M248641</guid>
      <dc:creator>Vikas-Nifi</dc:creator>
      <dc:date>2024-09-26T10:22:19Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi ListFile/ListSFTP + FetchFile/FetchSFTP issue</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-ListFile-ListSFTP-FetchFile-FetchSFTP-issue/m-p/394025#M248644</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/110342"&gt;@Vikas-Nifi&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Your dataflow is working as designed.&lt;BR /&gt;You have your listFile producing three FlowFiles (1 for each file listed).&amp;nbsp; Each of those FlowFiles the trigger the execution of your FetchFile which you have configured to fetch the content of only one those files.&lt;BR /&gt;&lt;BR /&gt;If you only want to fetch "&lt;SPAN&gt;test_1.txt", you need to either configure the listFile to only list file "test_1.txt" or you need to add a RouteOnAttribute processor between your listFile and FetchFile so that you are only routing the listed FlowFile with ${filename:equals{'test_1.txt')} to the FetchFile and auto-terminating the other listed files.&lt;BR /&gt;&lt;BR /&gt;The first option of only listing the file you want to fetch the content for is the better option unless there is more to your use case then you have shared.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please help our community thrive. If you found&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;of the suggestions/solutions provided helped you with solving your issue or answering your question, please take a moment to login and click "&lt;SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;Accept as Solution&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/EM&gt;" on&amp;nbsp;&lt;STRONG&gt;one or more&lt;/STRONG&gt;&amp;nbsp;of them that helped.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you,&lt;BR /&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 12:22:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-ListFile-ListSFTP-FetchFile-FetchSFTP-issue/m-p/394025#M248644</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2024-09-26T12:22:07Z</dc:date>
    </item>
  </channel>
</rss>

