- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Unable to delete partition having %01 in the name
- Labels:
-
Apache Hive
Created 03-19-2023 05:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Members,
I have accidently created a partition having characters %01 in the name. %01 is start of header `as per the notepad++`.
When i am trying to delete the partition using ALTER statement, there is no error but partition also not getting deleted.
can anyone suggest how to delete such partitions with special characters.
ALTER TABLE <table_name> DROP IF EXISTS PARTITION (code='YATHAH%0188QW');
Created 03-23-2023 03:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Found the solution - replace %01 --> \001 and it did the trick to delete the partition.
Created 03-20-2023 01:11 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you set below param:
set hive.msck.path.validation=skip;
Then use
MSCK REPAIR TABLE tablename DROP PARTITIONS;
Created 03-20-2023 01:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Asish,
Thanks for response. I tried as per your comments still the result is same.
Partition is not getting dropped.
Created 03-20-2023 01:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created 03-20-2023 01:53 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no error, i think the partition is not getting recognized because of -> %01
Created 03-20-2023 02:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created 03-20-2023 10:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Asish, This also didn't work.
Created 03-23-2023 05:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@hive1
What is the hive version? Can you try the below and revert
Set the below two properties before executing the rename partition
hive> set fs.file.impl.disable.cache=false;
Then run the rename partition command
Share the output for further analysis
Created 03-23-2023 03:55 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Found the solution - replace %01 --> \001 and it did the trick to delete the partition.
