Member since
07-05-2024
5
Posts
2
Kudos Received
0
Solutions
08-08-2024
02:10 AM
@Kondaji wrote: Hi Team, I am facing the issue, while trying to fetch the value from jsonpathreader with avroschema attributes as below. json reading from avro schema with jsonpathreader, and want to fetch home number with expression $.phoneNumbers[?(@.type=="home")].number. However, it is getting failed. Socrates GM Please help on this. {
"firstName": "John",
"lastName": "Smith",
"isAlive": true,
"age": 25,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021-3100"
},
"phoneNumbers": [
{
"type": "home",
"number": "212 555-1234"
},
{
"type": "office",
"number": "646 555-4567"
}
],
"children": [],
"spouse": null
} Hello, I understand your frustration with this issue. It seems like the JSONPath expression you’re using should work, but there might be a few things to check: Ensure JSONPathReader is correctly configured: Verify that the JSONPathReader is set up properly in your NiFi flow. Check the Avro Schema: Make sure the Avro schema matches the structure of your JSON data. Validate JSONPath Expression: Double-check the JSONPath expression $.phoneNumbers[?(@.type=="home")].number for any syntax errors. Hope this will help you. Best regards, florence0239
... View more
07-11-2024
03:44 AM
1 Kudo
Not sure why do you need to use the replace text processor in this case. I provided that in my sample above as an example anda a way to simulate getting new data by replacing the original content with something else. You can think of replaceText as if Im doing InvokeHttp and getting different flowfile content in the response releationship. If you got the data from module C just link directly to the join enrichment. As long as you have the correct writer\reader configured for each fork then you should be good.
... View more