4.5.2 数据清洗

1. 删除数据

--删除数据时where后必须拼接删除条件
delete from common_example001 where partition like 'data_operate' and s1='zs';

2. 清空分区数据

--清空物理表分区数据
truncate systable common_example001 partitions data_operate ;
--清空映射表分区数据(映射表详细用法请参考4.1.映射表特性)
truncate mapping mappping_example001 partitions data_operate ;

3. 清空分区数据,保留表结构

--清空物理表数据
truncate table common_example001;
--清空映射表数据
truncate mapping common_example001;

4. 删除表指定分区

--删除物理表指定分区
drop table common_example001 partitions teststream;
--删除映射表指定分区
drop mapping mappping_example001 partitions teststream;

5. 删除表

--删除物理表
drop table common_example001;
--删除映射表
drop mapping mappping_example001;
Copyright © lucene.xin 2020 all right reserved修改时间: 2021-07-02 11:42:23

results matching ""

    No results matching ""