Apache drill 使用ApacheDrill查询嵌套的异构json
我有多个具有相同结构的json文件,我正试图使用ApacheDrill对其进行查询。json是这样的:Apache drill 使用ApacheDrill查询嵌套的异构json,apache-drill,Apache Drill,我有多个具有相同结构的json文件,我正试图使用ApacheDrill对其进行查询。json是这样的: { "job":{ "executionMode":{ "type":"historical", "startTime":"2020-09-10 03:00:00", "endTime":"
{
"job":{
"executionMode":{
"type":"historical",
"startTime":"2020-09-10 03:00:00",
"endTime":"2020-09-10 05:00:00"
},
"outputFolder":"./data/C106/1515/20200910044022",
"fileNamePrefix":"dataframes",
"outputMultipleFiles":false,
"logfileNamePrefix":"lclog",
"fillNull":true,
"compressDataframe":false,
"lcLogs":"ON",
"UUID":"8cc2e3fe",
"dataframeExecutionStartTime":"2020-09-10T09:40:37.681Z",
"dataframeFileHeaders":"timestamp,PowerMetrics TotalCPUPower,Fan 1 RPMReading,Fan 3 RPMReading",
"dataframeExecutionEndTime":"2020-09-10T09:40:39.555Z",
"lclogExecutionStartTime":"2020-09-10T09:40:39.556Z",
"lclogFileHeaders":"time|context|created|description|entrytype|id|message|messageargs|messageargscount|messageid|name|oemrecordformat|severity|sourceId",
"lclogExecutionEndTime":"2020-09-10T09:40:39.785Z"
},
"database":{
"connection":{
"name":"influxdb",
"protocol":"http",
"host":"",
"port":"",
"database":"",
"username":"",
"password":""
},
"query":{
"sampleInterval":null,
"aggregationFunction":null,
"fillType":null,
"deleteAfter":false
},
"servers":[
]
},
"redfish":[
{
"metricReport":"FanSensor",
"metrics":[
"RPMReading"
]
},
{
"metricReport":"PowerMetrics",
"metrics":[
"SystemPowerConsumption",
"TotalCPUPower",
"TotalFanPowerTotalStoragePower"
]
},
{
"metricReport":"CPUSensor",
"metrics":[
"TemperatureReading"
]
}
],
"lcLogMeasurements":[
"LClogdata"
]
}
我想写一个查询,可以将数据转换为以下格式:
在ApacheDrill中这可能吗?
如果是,那么查询将是什么。
非常感谢你的帮助。多谢各位