hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nitin Pawar <>
Subject Re: Drop Partition by ID
Date Mon, 21 Jul 2014 14:10:19 GMT
you can try with like statement
On 21 Jul 2014 19:32, "fab wol" <> wrote:

> Hi everyone,
> I have the following problem: I have a partitoned managed table (Partition
> table is a string which represents a date, eg. log-date="2014-07-15").
> Unfortunately there is one partition in there like this:
> log_date=2014-07-15-23%3A45%3A38 (copied from show partitions stmt). This
> partitions most likeley got created to a wrong script 8which is fixed).
> Now i want to delete this partition, but it doesn't work:
>    - alter table ... drop partitition
>    (log_date='2014-07-15-23%3A45%3A38') gives no error, but the partition is
>    still existing afterwards
>    - I tried escaping the %-signs with backslashes but no luck with that
>    - I delete the directory in the HDFS and run msck repair table
>    afterwards. It recognizes that the folder is missing but is not deleting
>    the metadata
> So what can I do to get rid of the metadata? My next guess would be to go
> directly to the metastore DB and delete the metadata there. But what
> exactly has to be deleted? I guess there are several dependencies.
> Other idea: is there a possibility in Hive to delete a partition by a
> unique ID or something like that?
> Or what is needed to delete the table with the normal "alter table drop
> partition" command?
> Cheers
> Wolli

View raw message