<?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: compare ListFTP contents to what is in hive. in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/compare-ListFTP-contents-to-what-is-in-hive/m-p/175873#M75502</link>
    <description>&lt;P&gt;This worked great, thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 08 Mar 2018 23:19:02 GMT</pubDate>
    <dc:creator>margarita_uk</dc:creator>
    <dc:date>2018-03-08T23:19:02Z</dc:date>
    <item>
      <title>compare ListFTP contents to what is in hive.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/compare-ListFTP-contents-to-what-is-in-hive/m-p/175871#M75500</link>
      <description>&lt;P&gt;I have a process that fetches files from an ftp location and processes them HDFS -&amp;gt; hive.  At the end of the day I would like to reconcile that I loaded all files on FTP into the hive table.  The hive table has a field for filename so I can get the distinct listing of files loaded for that day using the selectHiveQL processor.  I tried getting the list of files off FTP from the listFTP processor but it is just queueing up 20 zero byte files.  I envisioned being able to just listFTP -&amp;gt; MergeContent to have a text file of all filenames in ftp directory and then somehow compare the results of selectHiveQL and listFTP/mergecontent but mergecontent doesnt even run with the zero byte files input.  Any suggestions on how to do this correctly?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 03:44:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/compare-ListFTP-contents-to-what-is-in-hive/m-p/175871#M75500</guid>
      <dc:creator>margarita_uk</dc:creator>
      <dc:date>2018-03-08T03:44:02Z</dc:date>
    </item>
    <item>
      <title>Re: compare ListFTP contents to what is in hive.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/compare-ListFTP-contents-to-what-is-in-hive/m-p/175872#M75501</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/70298/margaritauk.html" nodeid="70298" target="_blank"&gt;@Margarita Uk&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Use ReplaceText after ListFTP processor and before MergeContent processor with replacing the filename as the contents of the flowfile.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Replace text Processor Configs:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="62708-replacetext.png" style="width: 1600px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19745iBC4EDF3357F30D16/image-size/medium?v=v2&amp;amp;px=400" role="button" title="62708-replacetext.png" alt="62708-replacetext.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;So we are keeping the filename as the contents of the flowfile with above configs.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Then use MergeContent Processor with Below Config:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="62709-mergecontent.png" style="width: 1980px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/19746i8A52672B08604074/image-size/medium?v=v2&amp;amp;px=400" role="button" title="62709-mergecontent.png" alt="62709-mergecontent.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Configure the merge content processor as per your requirements and change the delimiter strategy as text and Demarcator with , and new line.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Output:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;940630588913985, &amp;lt;br&amp;gt;940634934689001&lt;/PRE&gt;&lt;P&gt;As i'm having 2 files from generateflowfile processor then i did replacetext and changed the contents of flowfile as the flowfile name in it.&lt;/P&gt;&lt;P&gt;After mergecontent processor we are having 2 flowfilenames with , and newline as demarcators.&lt;/P&gt;&lt;P&gt;For comparing store the merged file having filenames in it into Hive and then get the distinct filenames that are loaded into hive table.&lt;/P&gt;&lt;P&gt;Then compare both filenames&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;by getting the results if the filename is presented in first hivetable(merged filenames table) and &lt;/LI&gt;&lt;LI&gt;not in your actual hivetable that you loaded the data into.&lt;/LI&gt;&lt;/OL&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:03:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/compare-ListFTP-contents-to-what-is-in-hive/m-p/175872#M75501</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T10:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: compare ListFTP contents to what is in hive.</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/compare-ListFTP-contents-to-what-is-in-hive/m-p/175873#M75502</link>
      <description>&lt;P&gt;This worked great, thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 23:19:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/compare-ListFTP-contents-to-what-is-in-hive/m-p/175873#M75502</guid>
      <dc:creator>margarita_uk</dc:creator>
      <dc:date>2018-03-08T23:19:02Z</dc:date>
    </item>
  </channel>
</rss>

