赞
踩
CREATE TABLE table2 AS SELECT * FROM table1 WHERE column1 = 'value1';
alter table table_name add if not exists partition(dt='20230301');
INSERT INTO TABLE table_name1 partition (dt = '20230305')
select store_id,item_id from table_name2 limit 10;
Alter table table_name
add columns (col1 string COMMENT '类目');
DROP TABLE [IF EXISTS] table_name;
alter table tablename
drop if exists partition (dt='20230301');
alter table table_name drop column cate_level3_id;
ALTER TABLE table_name RENAME TO new_table_name;
alter table tablename partition(dt='20230305.wrs')
rename to partition (dt='20230305.wrs.rename');
Alter table table_name change column cate_level3_id cate_level3_id bigint;
alter table table_name
change column hash comb_hash string;
参考:专有云文档中心 > 大数据计算服务 > 用户指南 > 修改列注释
ALTER TABLE table_name
CHANGE COLUMN col_name COMMENT 'comment_string';
-- 禁止表trans的生命周期功能。
ALTER TABLE trans DISABLE LIFECYCLE;
– 会在日志中打印
show partitions table;
SELECT
111110000000+row_number() over (order by pic) as item_id,
pic,emb,dt
FROM {0} LIMIT 100;
with platform_item_pic as(
-------- 标品
select title
,main_pic
from hive_table
where ds='${bizdate}' and status='3')
INSERT OVERWRITE TABLE table_name partition(dt='model.finetune.canyin.epoch2')
select pic_id,hash_emb from
((select * from table_name where dt='v3')
union
(select * from table_name where dt='v4')
UNION
(select * from table_name where dt='v6'))
group by pic_id,hash_emb
;
https://help.aliyun.com/zh/maxcompute/user-guide/clone-table?spm=a2c4g.11186623.0.0.b4d02342fQa1WX
可以直接对不存在的表B进行填充
clone table A partition (ds='20231231')
to B;
■ \blacksquare ■
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。