Hi all,
I haven't been able to work this out and I was hoping someone can help answer. I am looking to create a table using the JSON similar to below:
{
"type": "Data",
"version": "1.0",
"meter": {
"serial": "12345678"
},
"payload": {
"PlantNumber": "12345678"
},
"Configuration": {
"IntervalLength": "PT30M",
"Channels": [
{
"Source": "PositiveTotal",
},
{
"Source": "NegativeTotal",
},
]
},
"Channels": [
{
"Intervals": [
{
"Time": "2019-08-12T01:30:00.000",
"Value": "0"
},
{
"Time": "2019-08-12T02:00:00.000",
"Value": "0"
},
{
"Time": "2019-08-12T02:30:00.000",
"Value": "0"
},
]
},
{
"Intervals": [
{
"Time": "2019-08-12T01:30:00.000",
"Value": "53"
},
{
"Time": "2019-08-12T02:00:00.000",
"Value": "67"
},
{
"Time": "2019-08-12T02:30:00.000",
"Value": "66"
},
]
},
]
}
Ideally my table would look like:
PlantNumber | Source | Time | Value
12345678 | PositiveTotal | 2019-08-12T01:30:00.000 | 0
12345678 | PositiveTotal | 2019-08-12T02:00:00.000 | 0
12345678 | PositiveTotal | 2019-08-12T02:30:00.000 | 0
12345678 | NegativeTotal | 2019-08-12T01:30:00.000 | 53
12345678 | NegativeTotal | 2019-08-12T01:30:00.000 | 67
12345678 | NegativeTotal | 2019-08-12T01:30:00.000 | 66
I've tried combinations of spath and mvzip but I am at a loss of how to generate this table format, any help would be appreciated.
... View more