- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Nifi Nested JSON flowfile into multiple flowfiles with parent JSON
- Labels:
-
Apache NiFi
Created 04-21-2021 03:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I wanted to parse the following JSON file flow file
{
"vehicle_speed": 657,
"vehicle_temp": 99,
"sensor_level": 45,
"temp": [
{
"sensor_number": 0,
"sensor_description": "Exists",
"sensor_name": 43
},
{
"sensor_number": 1,
"sensor_description": "Exists",
"sensor_name": 31,
}
],
"timestamp": 161903601000
}
into two flow files ("temp" element value is dynamic and can contain different number of json not necessarily two as in this example)
{
"vehicle_speed": 657,
"vehicle_temp": 99,
"sensor_level": 45,
"sensor_number": 0,
"sensor_description": "Exists",
"sensor_name": 43,
"timestamp": 161903601000
}
and
{
"vehicle_speed": 657,
"vehicle_temp": 99,
"sensor_level": 45,
"sensor_number": 1,
"sensor_description": "Exists",
"sensor_name": 31,
"timestamp": 161903601000}
Created 04-22-2021 09:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think you can solve it with JOLT Transform.
