Dataphin中想要删除分区数据执行SQL报错:“com.aliyun.odps.OdpsException: ODPS-0130071:[1,1] Semantic analysis exception - trying to delete from a non-transactional table is not allowed. Set tblproperties ("transactional" = "true") in order to use this feature”
更新时间:
问题描述
Dataphin中想要删除具体的物理表分区数据,执行SQL失败报错:“com.aliyun.odps.OdpsException: ODPS-0130071:[1,1] Semantic analysis exception - trying to delete from a non-transactional table is not allowed. Set tblproperties ("transactional" = "true") in order to use this feature”。
问题原因
执行的MaxCompute的语法错误,实际需要执行SQL语法:
alter table <table_name> drop [if exists] partition <pt_spec>;
解决方案
执行删除分区语法即可,例如:
alter table company_sales_record_00 drop partition(ds='20220825');
适用于
- 适用产品:Dataphin
- 适用的版本:公共云V3.5.6
文档内容是否对您有帮助?