我正在尝试查询HDFS上存储的以下JSON示例文件
{
"tag1": "1.0",
"tag2": "blah",
"tag3": "blahblah",
"tag4": {
"tag4_1": [{
"tag4_1_1": [{
"tag4_1_1_1": {
"Addr": {
"Addr1": "blah",
"City": "City",
"StateProvCd": "NY",
"PostalCode": "99999"
}
}
"tag4_1_1_1": {
"Addr": {
"Addr1": "blah2",
"City": "City2",
"StateProvCd": "NY",
"PostalCode": "99999"
}
}
}
]
}
]
}
}
Run Code Online (Sandbox Code Playgroud)
我使用以下内容在数据上创建了一个外部表
CREATE EXTERNAL TABLE DB.hv_table
(
tag1 string
, tag2 string
, tag3 string
, tag4 struct<tag4_1:ARRAY<struct<tag4_1_1:ARRAY<struct<tag4_1_1_1:struct<Addr
Addr1:string
, City:string
, StateProvCd:string
, PostalCode:string>>>>>>
)
ROW FORMAT SERDE 'org.apache.hive.hcatalog.data.JsonSerDe'
LOCATION 'HDFS/location';
Run Code Online (Sandbox Code Playgroud)
理想情况下,我想查询数据,以便其返回给我: …
我知道如何在Nifi中删除单个属性,但是删除多个属性的正确语法是什么?我必须使用多个UpdateAttributes转换,还是可以使用分隔符来分隔属性?
谢谢!