Member since
01-26-2022
82
Posts
2
Kudos Received
5
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
700 | 09-08-2022 04:02 AM | |
1658 | 07-27-2022 03:29 AM | |
1222 | 06-28-2022 09:43 PM | |
1223 | 06-27-2022 08:42 AM | |
12687 | 06-16-2022 10:29 PM |
05-13-2023
03:41 AM
Thank you so much too. This also works. But i am actually a learner using Jolt.
... View more
05-13-2023
03:38 AM
Thank so much. It works. The only issue i have reconstructing back to this format using updaterecord processor: {
"data": [
{
"room": "A",
"path": "/old/can"
}
]
}
... View more
05-12-2023
08:54 AM
manual testing using: SELECT * FROM FLOWFILE WHERE RPATH_STRING(data, '/room')='A' I received an error message: 16:47:59 WATERROR01881003-cbda-1ae7-fdab-6af8640a064e
QueryRecord[id=01881003-cbda-1ae7-fdab-6af8640a064e] Unable to query FlowFile[filename=596ac8a5-8431-4b42-b7e5-84fe972fe09b] due to java.lang.RuntimeException: RecordPath /room resulted in more than one return value. The RecordPath must be further constrained.: {}
... View more
05-12-2023
08:50 AM
This is the source json: {
"data": [
{
"room": "A",
"path": "/old/can"
},
{
"room": "B",
"path": "/old/can"
},
{
"room": "C",
"path": "/old/can"
}
]
}
... View more
05-12-2023
08:34 AM
But after enclosing "ip" in a single quote like this '${'ip'}', i got another error message below: 16:29:55 WAT ERROR 01881003-cbda-1ae7-fdab-6af8640a064e QueryRecord[id=01881003-cbda-1ae7-fdab-6af8640a064e] Unable to query FlowFile[filename=4ac8ca57-9b9b-481a-8371-1d9f1ede2ab0] due to java.lang.RuntimeException: RecordPath /room resulted in more than one return value. The RecordPath must be further constrained.: {} Thank you.
... View more
05-12-2023
08:27 AM
16:25:08 WATERROR01881003-cbda-1ae7-fdab-6af8640a064e QueryRecord[id=01881003-cbda-1ae7-fdab-6af8640a064e] Unable to query FlowFile[filename=de224186-58a6-4d88-8d34-de5170bd74ed] due to org.apache.nifi.attribute.expression.language.exception.AttributeExpressionLanguageException: Invalid Expression: SELECT * FROM FLOWFILE WHERE RPATH_STRING(data, '/room')='${ip}' due to Unexpected token '}' at line 1, column 4. Query: ${ip}: {} Thank you, i received the above error message.
... View more
05-12-2023
02:46 AM
Hello all, I am trying to use QueryRecord processor to filter a json file but i am getting 0kb flowfile on my filter relationship. My input flowfile is: { "data": [ { "room": "A", "path": "/old/can" }, { "room": "B", "path": "/old/can" }, { "room": "C", "path": "/old/can" } ] } My filter query: SELECT * FROM FLOWFILE WHERE RPATH_STRING(data, '/room[*]')='${'ip'}' NOTE: ip is an attribute using to compare which class to filter, so if ip = A my output after filtering should be { "data": [ { "room": "A", "path": "/old/can" } ] } Thank you all.
... View more
Labels:
04-19-2023
03:16 AM
Thank you sir @SAMSAL . I am very grateful, at the moment, your solution does the job. Also, i would love to learn JoltTransformation from you. Thanks once again.
... View more
04-16-2023
12:58 PM
I am very grateful for your help so far sir @SAMSAL. Actually, i made a silly mistake concerning that key duplication. I wanted to have something of this nature, that is separate objects each with "Details" topmost level. "Details" : {
"0":{
"test1" : "test output",
"test2" : "test output",
"id" : "first",
"name" : "the first one"
}},
"Details":{
"1":{
"test1" : "test output",
"test2" : "test output",
"id" : "second",
"name" : "the second one"
}}
... View more
04-16-2023
08:38 AM
Thank you sir @SAMSAL . Actually the desired output is {
"Details" : { "0":{
"test1" : "test output",
"test2" : "test output",
"id" : "first",
"name" : "the first one"
}}, "Details":{ "1":{
"test1" : "test output",
"test2" : "test output",
"id" : "second",
"name" : "the second one"
}}
}
... View more