hadoop 是否读取配置单元表中的嵌套Json数据?

5ktev3wc  于 2022-12-22  发布在  Hadoop
关注(0)|答案(1)|浏览(225)
{ "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;
hm2xizp9

hm2xizp91#

您的数据格式不正确json。
第一个月

相关问题