我试过装简单的 JSON
从一个文件记录到配置单元表中,如下所示。每个 JSON
记录在另一行中。
{"Industry":"Manufacturing","Phone":null,"Id":null,"type":"Account","Name":"Manufacturing"}
{"Industry":null,"Phone":"(738) 244-5566","Id":null,"type":"Account","Name":"Sales"}
{"Industry":"Government","Phone":null,"Id":null,"type":"Account","Name":"Kansas City Brewery & Co"}
但我找不到 serde
加载逗号数组 (,)
分开的 JSON
记录到配置单元表中。输入是一个包含 JSON
如下所示的记录。。。
[{"Industry":"Manufacturing","Phone":null,"Id":null,"type":"Account","Name":"Manufacturing"},{"Industry":null,"Phone":"(738) 244-5566","Id":null,"type":"Account","Name":"Sales"},{"Industry":"Government","Phone":null,"Id":null,"type":"Account","Name":"Kansas City Brewery & Co"}]
有人能给我提个建议吗 serde
它可以解析这个 JSON
文件?
谢谢
1条答案
按热度按时间9avjhtql1#
您可以检查这个序列:https://github.com/rcongiu/hive-json-serde
另一篇相关文章:使用hive解析json数组