Using Apache Nifi i am trying to figure out how to find records which have a string in an array that start with a value
Given the below array, i would like only record which have a tag that start with '/test2/'
[
{
"name":"bob",
"tags":[ "/test1/foo","/alpha"]
}
,
{
"name":"bill",
"tags":[ "/test2/blah","/beta"]
}
]
SELECT * FROM FLOWFILE WHERE RPATH_STRING(tags, '/') LIKE '/test2/%'
due to java.lang.String cannot be cast to org.apache.nifi.serialization.record.Record: java.lang.ClassCastException: java.lang.String cannot be cast to org.apache.nifi.serialization.record.Record
I've tried a few other permutations, but no luck.