- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
truncate partition external table
- Labels:
-
Apache Hive
Created ‎04-28-2017 07:27 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
Can we truncate partition external table ?
Sharing an example where i faced the issue .
hive> truncate table abc.Stage_xact_personall_region_of_Sale partition (region_code='TYES');
FAILED: SemanticException [Error 10146]: Cannot truncate non-managed table abc.Stage_xact_personall_region_of_Sale .
Help will be much appreciated ASAP .
-Thanks
Satish
Created ‎04-28-2017 08:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎04-28-2017 08:08 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎04-28-2017 01:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot ..
It works
Consolidated answer
ALTER TABLE abc.Stage_xact_personall_region_of_Sale DROP PARTITION (region_code='TYES');
Then do an overwrite on it
insert overwrite table abc.Stage_xact_personall_region_of_Sale partition(region_code) select * from xyz.Region_Sale where region_code='TYES';
-Thanks
Satish
