<?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: Hive external table partition update automatically in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Hive-external-table-partition-update-automatically/m-p/313890#M225787</link>
    <description>&lt;P&gt;The "msck repair table ..." command does not really read new data files, but adds new partitions (subdirectories in HDFS) in table metadata.&lt;/P&gt;&lt;P&gt;What you could do is to create in advance all the partitions (for month or more) - initially empty- and run the "repair" command just once:&lt;/P&gt;&lt;P&gt;hdfs dfs -mkdir /user/data/year=2021/month=04/day=1&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;hdfs dfs -mkdir /user/data/year=2021/month=04/day=30&lt;/P&gt;&lt;P&gt;hive&amp;gt;msck repair table &amp;lt;table_name&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When You put your log files inside one of these directories, they will be immediately visible from Hive (just set the correct permissions using Ranger or hdfs).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe You can repeat this operations (create directories and "repair table") during logs maintenance, as you should have some policies to remove old logs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;</description>
    <pubDate>Wed, 31 Mar 2021 14:59:39 GMT</pubDate>
    <dc:creator>giovannimori</dc:creator>
    <dc:date>2021-03-31T14:59:39Z</dc:date>
  </channel>
</rss>

