Options
- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Jolt transformation in apache nifi
Labels:
- Labels:
-
Apache NiFi
Explorer
Created 10-12-2022 08:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
input:
{
"tags": [
{
"tag": "component",
"value": "memory"
},
{
"tag": "class",
"value": "os"
},
{
"tag": "target",
"value": "linux"
}
]
}
Expected output:
The tag component value should be assigned to parameter field.
{
"parameter": "memory"
}
Please help me out.
1 REPLY 1
Super Guru
Created 10-13-2022 06:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Try the following Jolt spec:
[
{
"operation": "shift",
"spec": {
"tags": {
"*": {
"tag": "tags.[#2].Parameter",
"value": "tags.[#2].value"
}
}
}
}
]If you find this helpful please accept solution.