从HDFS上创建表
JSON格式:
create external table sonar_https(
host string,
ip string,
path string,
port int,
vhost string,
data string)
ROW FORMAT SERDE ‘org.apache.hive.hcatalog.data.JsonSerDe’
STORED AS TEXTFILE
location ‘/datasets/sonar/http’;
从HDFS上创建表
JSON格式:
create external table sonar_https(
host string,
ip string,
path string,
port int,
vhost string,
data string)
ROW FORMAT SERDE ‘org.apache.hive.hcatalog.data.JsonSerDe’
STORED AS TEXTFILE
location ‘/datasets/sonar/http’;