Created 04-28-2017 07:27 AM
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
Created 04-28-2017 08:08 AM
Created 04-28-2017 01:46 PM
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