<?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: How can I Alter multiple partitions at once on Impala ? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/277424#M207558</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/24734"&gt;@tmater&lt;/a&gt;&amp;nbsp; unfortunately this kind of expression (&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;part_col='201801*'&amp;nbsp;&lt;/EM&gt;) does not work.&lt;/P&gt;</description>
    <pubDate>Tue, 17 Sep 2019 07:11:51 GMT</pubDate>
    <dc:creator>eMazarakis</dc:creator>
    <dc:date>2019-09-17T07:11:51Z</dc:date>
    <item>
      <title>How can I Alter multiple partitions at once on Impala ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/268338#M206105</link>
      <description>&lt;P&gt;I would like to drop multiple partitions of an impala table at once.&lt;/P&gt;&lt;P&gt;Can I use the following statement&amp;nbsp; in order to delete all the partitions of January ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ALTER TABLE schema.Table&amp;nbsp; DROP IF EXISTS PARTITION (part_col='201801*') PURGE ;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I use &lt;STRONG&gt;Star Wildcard&lt;/STRONG&gt;&amp;nbsp; just as unix?&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2019 08:38:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/268338#M206105</guid>
      <dc:creator>eMazarakis</dc:creator>
      <dc:date>2019-08-20T08:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I Alter multiple partitions at once on Impala ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/269804#M207099</link>
      <description>&lt;P&gt;Hi&amp;nbsp;eMazarakis,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Multiple partitions can be dropped with the following syntax:&lt;/P&gt;&lt;PRE&gt;alter table historical_data drop partition (year = 1996 and month between 1 and 6);&lt;/PRE&gt;&lt;P&gt;Please see our &lt;A href="https://www.cloudera.com/documentation/enterprise/latest/topics/impala_alter_table.html" target="_self"&gt;ALTER TABLE Statement&lt;/A&gt; documentation for more details, the multiple partition drop can be found in section:&amp;nbsp;&lt;EM&gt;To drop or alter multiple partitions&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 08:59:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/269804#M207099</guid>
      <dc:creator>tmater</dc:creator>
      <dc:date>2019-09-05T08:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: How can I Alter multiple partitions at once on Impala ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/269818#M207110</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/24734"&gt;@tmater&lt;/a&gt;&amp;nbsp; &amp;nbsp;my Cloudera version is 5.9 . I forgot to mentioned that.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 10:54:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/269818#M207110</guid>
      <dc:creator>eMazarakis</dc:creator>
      <dc:date>2019-09-05T10:54:23Z</dc:date>
    </item>
    <item>
      <title>Re: How can I Alter multiple partitions at once on Impala ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/277335#M207524</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/32123"&gt;@eMazarakis&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Thank you for the additional information. Altering multiple partitions was implemented in&amp;nbsp;&lt;A href="https://issues.apache.org/jira/browse/IMPALA-1654" target="_self"&gt;IMPALA-1654&lt;/A&gt;, this feature is available from Impala 2.8+ which is part of CDH 5.10+.&lt;/P&gt;&lt;P&gt;Although, I am not aware of the workflow and the amount of data behind a partition, this specific expression&amp;nbsp;&lt;EM&gt;part_col='201801*&lt;/EM&gt;&amp;nbsp;removes a whole month. If these requests are frequent and the workload/workflow allows it re-partitioning based on months could be a feasible workaround.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2019 08:45:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/277335#M207524</guid>
      <dc:creator>tmater</dc:creator>
      <dc:date>2019-09-16T08:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: How can I Alter multiple partitions at once on Impala ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/277424#M207558</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/24734"&gt;@tmater&lt;/a&gt;&amp;nbsp; unfortunately this kind of expression (&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;part_col='201801*'&amp;nbsp;&lt;/EM&gt;) does not work.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 07:11:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/277424#M207558</guid>
      <dc:creator>eMazarakis</dc:creator>
      <dc:date>2019-09-17T07:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: How can I Alter multiple partitions at once on Impala ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/277467#M207566</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/32123"&gt;@eMazarakis&lt;/a&gt;, apologies, I meant the&amp;nbsp;&lt;EM&gt;part_col='201801*'&lt;/EM&gt; intends to remove a whole month. If possible might worth reconsidering the partition strategy or the drop operation could be done in Hive separately.&lt;/P&gt;&lt;P&gt;From CDH 5.10+ partition expressions can be specified, please see my response &lt;A href="https://community.cloudera.com/t5/Support-Questions/How-to-drop-all-the-sub-partitions-of-a-certain-partition-on/m-p/277362/highlight/true#M207537" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;for details.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 08:12:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/277467#M207566</guid>
      <dc:creator>tmater</dc:creator>
      <dc:date>2019-09-17T08:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: How can I Alter multiple partitions at once on Impala ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/278026#M207795</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/24734"&gt;@tmater&lt;/a&gt;&amp;nbsp; &amp;nbsp; the following command , did not remove the partitions/dirs in my cloudera version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ALTER TABLE&amp;nbsp; &lt;STRONG&gt;tblName&lt;/STRONG&gt; DROP IF EXISTS PARTITION ( &lt;EM&gt;part_col='201801*'&amp;nbsp;&lt;/EM&gt;) PURGE.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think special characters such as * cannot be used in this version.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2019 11:26:57 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/278026#M207795</guid>
      <dc:creator>eMazarakis</dc:creator>
      <dc:date>2019-09-23T11:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can I Alter multiple partitions at once on Impala ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/278133#M207853</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/32123"&gt;@eMazarakis&lt;/a&gt;, later releases do not support asterisk either, it will be treated as a literal. The expressions that are available can be found &lt;A href="https://www.cloudera.com/documentation/enterprise/latest/topics/impala_alter_table.html" target="_self"&gt;here&lt;/A&gt;&amp;nbsp;in chapter '&lt;STRONG&gt;To drop or alter multiple partitions&lt;/STRONG&gt;'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Previously, I was referring to the intention behind "&lt;EM&gt;part_col='201801*'&lt;/EM&gt;&amp;nbsp;", it suggests that the desired outcome of this expression would be to remove all data from January 2018 in one operation. However, as it is not possible in CDH 5.9, I was proposing to choose a different partition strategy if multiple partitions have to be dropped frequently and the size of the data allows.&lt;/P&gt;&lt;P&gt;For example, if after ingestion only 1 analytic query is executed on the data, then the days have to be dropped one-by-one, which is 32 operations. Therefore, if the size of the data allows, the number of operations could be reduced to 2 with a different partition strategy where the table is partitioned by month.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2019 08:49:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-can-I-Alter-multiple-partitions-at-once-on-Impala/m-p/278133#M207853</guid>
      <dc:creator>tmater</dc:creator>
      <dc:date>2019-09-24T08:49:10Z</dc:date>
    </item>
  </channel>
</rss>

