Member since
06-24-2024
1
Post
0
Kudos Received
0
Solutions
06-25-2024
05:44 AM
I have a json [
{
"orderId": "100",
"orderItems": [
{
"orderItemSeqId": "101",
"externalId": "56789"
},
{
"orderItemSeqId": "102",
"externalId": null
}
]
},
{
"orderId": "200",
"orderItems": [
{
"orderItemSeqId": "201",
"externalId": "78990"
},
{
"orderItemSeqId": "202",
"externalId": "83937"
}
]
}
] Using QueryRecord processor in NiFi, I wish to select the orders having any item with null externalId. So, in the output we should have only the first map with "100" orderId as it has one item with null externalId. I tried this SQL with RPATH but doesn't work: SELECT *
FROM flowfile
WHERE RPATH_STRING(orderItems, '[*][isEmpty(./externalId)]') = 'true' isEmpty function of RecordPath returns true if the string is empty or null else false.
... View more
Labels:
- Labels:
-
Apache NiFi