Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

NiFi/JsonPathReader

avatar
New Contributor

Using the Put Mongo Record processor on Nifi.

Data is in JSON format.
You have to assign a Record Reader so for that we selected: JSONPathReader
We run the processor and the data succesfully enters Mongo. All keys for the data are present however every one of their values are "null."
We go back to the JSONPathReader and add a property for one of the fields:
E.g.:
$.name
We re-ingest the data and now the values for all the “name” fields are present.
So technically we could do this for every single field in the JSON document, but it doesn't provide for much flexibility and expansion of new datasets.

Does anyone know if there is a way to "splat" the JsonPathReader and have mongo accept all the values for every key?

1 REPLY 1

avatar
Super Guru

@lebron ,

 

Use the JsonTreeReader instead.

 

Cheers,

André

 

--
Was your question answered? Please take some time to click on "Accept as Solution" below this post.
If you find a reply useful, say thanks by clicking on the thumbs up button.