<?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: Partition in Hive table in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Partition-in-Hive-table/m-p/174647#M136910</link>
    <description>&lt;P&gt;here is example to drop partition&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ALTER TABLE mytable DROP IF EXISTS PARTITION(year = 2012, month = 12, day = 18);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 15 Nov 2016 14:25:22 GMT</pubDate>
    <dc:creator>sunile_manjee</dc:creator>
    <dc:date>2016-11-15T14:25:22Z</dc:date>
    <item>
      <title>Partition in Hive table</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Partition-in-Hive-table/m-p/174646#M136909</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have table 'tbl_1' with below columns. I need to delete data for revenue column for current month and last month every time I run the script which is daily and reload current month and last month. I have created partition on activity_dt and kpi_nm. Kpi_nm for revenue is ‘revenue’. How can I delete my partition? I have below query which does not work. Do I have to create shell and pass parameters? I would like to avoid it.&lt;/P&gt;&lt;P&gt;Activity_dt, Kpi_nm, Total_revenue, Gross_adds&lt;/P&gt;&lt;P&gt;alter table da_devstg_tbls.offline_transactions drop if exists partition ((activity_dt between ADD_MONTHS((CURRENT_DATE - EXTRACT(DAY FROM CURRENT_DATE)+1),-1) AND (CURRENT_DATE-1)) , kpi_nm = 'revenue');&lt;/P&gt;</description>
      <pubDate>Tue, 15 Nov 2016 11:34:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Partition-in-Hive-table/m-p/174646#M136909</guid>
      <dc:creator>rychitre</dc:creator>
      <dc:date>2016-11-15T11:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Partition in Hive table</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Partition-in-Hive-table/m-p/174647#M136910</link>
      <description>&lt;P&gt;here is example to drop partition&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;ALTER TABLE mytable DROP IF EXISTS PARTITION(year = 2012, month = 12, day = 18);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 Nov 2016 14:25:22 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Partition-in-Hive-table/m-p/174647#M136910</guid>
      <dc:creator>sunile_manjee</dc:creator>
      <dc:date>2016-11-15T14:25:22Z</dc:date>
    </item>
  </channel>
</rss>

