I'm using a Microsoft REST API to query a Azure application, oauth and request goes without problem.
The response from InvokeHTTP has this format
{"@odata.context":"https://****.dynamics.com/api/data/v9.1/$metadata#endpoint","value":[ here comes the actual JSON result in format {
"@odata_etag" : "W/\"555598\"", "field":"value...},...]
,"@odata.nextLink":"https://****.dynamics.com/api/data/v9.1/endpoint?$skiptoken.....}
I need to extract the nextLink for pagination and Value to continue the flow and store the result.
When I try to parse with inferAvroSchema so I can start working with, it throws this error:
Illegal initial character: @odata.etag
My Idea was to inferAvroSchema, then EvaluateJsonPath to extract the odata tags and then extract the values.
I tried using EvaluateJsonPath on the result asking to create an attribute for $.@odata.context but it doesn't find the item either, I'm sure is something about the @
.
I can also replace all the @
of the incoming flow for another char, but don't know if that makes sense.
I'm feeling that I'm not using a correct approach, but NIFI + odata doesn't give me results on google or here. I'm open to any suggestions!
thank you!