# Doris(Palo)
# 一、DDL
# 1.1 增加字段
alter table idl_annual_card_orders_class add COLUMN is_test_user int;
1
# 1.2 增加外表
CREATE EXTERNAL TABLE XXX.XXX(
orderid int(11) ,
bbsuserid bigint(20) ,
....
)
ENGINE = mysql
PROPERTIES (
"host" = "",
"port" = "",
"user" = "",
"password" = "",
"database" = "",
"table" = ""
);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
# 1.3 修改字段
-- 修改 base index 的 col1 列的类型为 BIGINT,并移动到 col2 列后面
ALTER TABLE example_db.my_table
MODIFY COLUMN col1 BIGINT DEFAULT "1" AFTER col2;
1
2
3
2
3
# 注意事项
- Hive中的表格必须为文本格式
- PALO三种数据模型可参考官方文档 (opens new window)