我是新手。我试过在struct
内部爆炸array
。JSON循环有点复杂,如下所示。在
{
"id": 1,
"firstfield": "abc",
"secondfield": "zxc",
"firststruct": {
"secondstruct": {
"firstarray": [{
"firstarrayfirstfield": "asd",
"firstarraysecondfield": "dasd",
"secondarray": [{
"score": " 7 "
}]
}]
}
}
}
我试图访问secondarray
字段下的score
字段,以便能够计算很少的指标并得出每个id
的平均分数。在
如果使用Glue,则应将DynamicFrame转换为Spark的DataFrame,然后使用explode函数:
相关问题 更多 >
编程相关推荐