Hive基本操作

  |   0 评论   |   0 浏览

建表

CREATE TABLE if not exists abeffect.demo_table (
    request_id string comment '请求id',
    event_name string comment '事件名',
)
PARTITIONED by (dayno string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY ','
STORED AS TEXTFILE;

查看表结构

desc abeffect.demo_table

插入单条数据

insert into abeffect.demo_table PARTITION (dayno='20220107') values (
    'mock_id',
    'webview',

查看数据

select * from abeffect.demo_table;