插入语句
insert into table 库名.表名 partition(【分区列名】= 【分区值】) values (column_value1,column_value2,column_value3,......)
示例:
insert into table app.app_crm_bd_home_data partition(dt = '2020-09-06') values(623709,10768,14,62,20200907,10,4);
hive表新增字段,示例
alter table app.app_crm_bd_home_data add columns(
`company_nums` int COMMENT '优雅的注释'
)
hive新建表,示例
CREATE TABLE IF NOT EXISTS `app.order` (
`order_id` bigint COMMENT 'order_id',
`amount` decimal(32,6) COMMENT '订单金额',
`status` string COMMENT '订单状态 确认 取消'
) comment '优雅的表注释'
partitioned by(`dt` int) STORED AS ORC;