我为嵌套数据尝试了以下脚本:
`books = load 'data/book-seded-workings-reduced.json'
using JsonLoader('user_id:chararray,type:chararray,title:chararray,year:chararray,publisher:chararray,authors:{(name:chararray)},source:chararray');`
group_auth = group books by title; maped = foreach group_auth generate group, books.authors;
fil = foreach maped generate flatten(books); DUMP fil;
但是我得到了一个错误:一个列需要从一个关系中投影出来才能用作标量
你知道吗?
1条答案
按热度按时间ycggw6v21#
输出:(在cloudera中使用serde加载json文件时引用的输入)