Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
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