Member since
03-16-2021
2
Posts
1
Kudos Received
0
Solutions
03-17-2021
09:26 PM
1 Kudo
Hi, Thanks for your reply. I have edited my sql query to return as this format. So I just need to use EvaluateJsonPath to continue. [
{
"machine":"PKG_HA_01_ON",
"counter":2.0,
"duration":8.02905
},
{
"machine":"PKG_HA_03_ON",
"counter":28.0,
"duration":57.29038333333333
}
]
... View more
03-16-2021
08:58 PM
Hi all, I am a newbie to Nifi so lack still in learning this too. I have a task to get data from executeSQL and the record return like this: [
{
"PKG_HA_01_ON":2.0,
"PKG_HA_03_ON":28.0,
"PKG_HA_04_ON":7.0,
"PKG_HA_05_ON":0.0,
"PKG_HA_06_ON":1.0,
"PKG_HA_09_ON":5.0
},
{
"PKG_HA_01_ON":8.02905,
"PKG_HA_03_ON":57.29038333333333,
"PKG_HA_04_ON":2.2858666666666663,
"PKG_HA_05_ON":60.0,
"PKG_HA_06_ON":12.291533333333332,
"PKG_HA_09_ON":12.3363
}
] This is the result of a union query. Now, I would like to convert into this: [
{
"machine":"PKG_HA_01_ON",
"counter":2.0,
"duration":8.02905
},
{
"machine":"PKG_HA_03_ON",
"counter":28.0,
"duration":57.29038333333333
}
] I have researched on JoltTransformJSON but still stuck with it. So what is the best way to achieve desired JSON? Thanks
... View more
Labels:
- Labels:
-
Apache NiFi