<?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 zip folder using nifi? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/how-to-zip-folder-using-nifi/m-p/280542#M208912</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have nifi flows like below&lt;BR /&gt;ListSFTP &amp;gt;&amp;gt; ... &amp;gt;&amp;gt; FetchSFTP &amp;gt;&amp;gt; ... &amp;gt;&amp;gt; MergeContent &amp;gt;&amp;gt; ... &amp;gt;&amp;gt; PutFTP&lt;/P&gt;&lt;P&gt;- FetchSFTP fetch all files in yyyymmdd folder( ex : ./A1/20191018 ) one by one&lt;BR /&gt;- MergeContent make all files into one zipfile.&lt;/P&gt;&lt;P&gt;It works well, but fetching all files one by one takes long time. also it needs lots of memory. Therefore we want to change above process into below&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;step1) Compress all files of one folder( ex : ./A1/20191018 --&amp;gt; 20191018.zip )&lt;BR /&gt;step2) Fetch this one zipfile&lt;BR /&gt;step3) PutFTP&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In this process, I dont know about step1&lt;BR /&gt;How can I Compress all files in folder?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;All files are in Windows.&lt;BR /&gt;Nifi is in Linux.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Oct 2019 06:52:19 GMT</pubDate>
    <dc:creator>maybegoodman</dc:creator>
    <dc:date>2019-10-18T06:52:19Z</dc:date>
    <item>
      <title>how to zip folder using nifi?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-zip-folder-using-nifi/m-p/280542#M208912</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have nifi flows like below&lt;BR /&gt;ListSFTP &amp;gt;&amp;gt; ... &amp;gt;&amp;gt; FetchSFTP &amp;gt;&amp;gt; ... &amp;gt;&amp;gt; MergeContent &amp;gt;&amp;gt; ... &amp;gt;&amp;gt; PutFTP&lt;/P&gt;&lt;P&gt;- FetchSFTP fetch all files in yyyymmdd folder( ex : ./A1/20191018 ) one by one&lt;BR /&gt;- MergeContent make all files into one zipfile.&lt;/P&gt;&lt;P&gt;It works well, but fetching all files one by one takes long time. also it needs lots of memory. Therefore we want to change above process into below&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;step1) Compress all files of one folder( ex : ./A1/20191018 --&amp;gt; 20191018.zip )&lt;BR /&gt;step2) Fetch this one zipfile&lt;BR /&gt;step3) PutFTP&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;In this process, I dont know about step1&lt;BR /&gt;How can I Compress all files in folder?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;All files are in Windows.&lt;BR /&gt;Nifi is in Linux.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Oct 2019 06:52:19 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-zip-folder-using-nifi/m-p/280542#M208912</guid>
      <dc:creator>maybegoodman</dc:creator>
      <dc:date>2019-10-18T06:52:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to zip folder using nifi?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-zip-folder-using-nifi/m-p/280594#M208931</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/70415"&gt;@maybegoodman&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NiFi is designed to operate on data which has been consumed by NiFi and placed in FlowFiles.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;That being said, it sounds like what you are trying to do here is zip all the files on the target SFTP server before consuming the zipped file by NiFi.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Perhaps you could use the ExecuteStreamCommand processor to use ssh to manually zip the contents of the target SFTP server based on a configured scheduling cron.&lt;BR /&gt;Then have your listSFTP processor only list .zip file instead.&lt;BR /&gt;&lt;BR /&gt;if the ExecuteStreamCommand is not adequate, there are several Script based processors perhaps you can use to write a custom script that handles step 1 fo connecting to SFTO server and zipping the files.&lt;/P&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>Fri, 18 Oct 2019 13:13:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-zip-folder-using-nifi/m-p/280594#M208931</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2019-10-18T13:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: how to zip folder using nifi?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/how-to-zip-folder-using-nifi/m-p/281457#M209389</link>
      <description>&lt;P&gt;Thankyou MattWho&lt;/P&gt;&lt;P&gt;I&amp;nbsp; added Executestreamcommand processer before fetching data.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 09:06:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/how-to-zip-folder-using-nifi/m-p/281457#M209389</guid>
      <dc:creator>maybegoodman</dc:creator>
      <dc:date>2019-10-28T09:06:15Z</dc:date>
    </item>
  </channel>
</rss>

