1.show p from 2019-9-12 to 2019-9-12 2000;显示所有odps这个时间段的命令
2.展示各个表的分区
show tables in martdata_phq_dev like '*ztt';
3.删除分区表的分区:
alter table martdata_phq.risk_index_base_bigdata if exists partition(tx_date=20190524)
4.删除没有分区的表:
drop table if exists tablename
5.向表中插入数据:
insert into | overwrite table tablename [partition(partcol1=var1,partcol2=var2...)] into向表的分区中追加数据,overwrite则会在向表或者分区中插入数据前清空表中原有数据
6.向动态分区中插入数值,在分区中指定一个分区列名,但不给出值,相应的在select子句中的对应列来提供分区的值,因为有些分区是不能固定的
insert overwrite table tablename partition(partcol1…) select partcol1… from_statement;
7.杀死进程
ctrl+c -> kill 进程号
8.更改表注释:
alter table table_name set comment 'tb comment'
9.修改列分区注释:
alter table table_name change column col_name comment 'comment';
10