# 添加jar包
hive> add jar /home/heyuan.lhy/develop/wanke_http_test/hive-json-serde-0.2.jar;
hive>
# 创建hive表
CREATE TABLE test_json
(
id BIGINT,
text STRING,
)
ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.JsonSerde'
STORED AS TEXTFILE
;
LOAD DATA LOCAL INPATH "test.json" OVERWRITE INTO TABLE test_json;