{ "Name": "Michael", "Location": ["Montreal","Toronto"], "Sex_age": {{"Male"},{"30"}}, "Skills": {"DB":"80"}, "Title": {"Product":["Developer","Lead"] } }
以上员工数据需要在表中读取和查询。请大家建议。我尝试创建一个单列表,并从相同的查询如下
create table jasonifies.employee (
value string)
ROW FORMAT SERDE 'org.openx.data.jsonserde.JsonSerDe'
STORED AS INPUTFORMAT 'org.apache.hadoop.mapred.TextInputFormat'
OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION '/FileStore/tables';
load data inpath '/json_data.json' into table jasonifies.employee;
create table jasonifies.employee2 as
select value from jasonifies.employee as emp1;
1条答案
按热度按时间hm2xizp91#
您的数据格式不正确json。
第一个月