Support Questions
Find answers, ask questions, and share your expertise
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Nested json to postgres in nifi

Nested json to postgres in nifi

New Contributor

Hi all,


I am relatively new to Nifi and it would be great to get some help from you guys here. I am using InvokeHttp to get a response which looks like this:


"headers" : [ "col1", "col2", "col3" ],
"rows" : [ [ "35000.0", "60.0", "937.06" ], [ "11000.0", "36.0", "385.65" ], [ "3600.0", "36.0", "109.57" ]]


Now, I would like to store this output in a Postgres DB using PutDatabaseRecord using a JsonTreeReader but it doesn't seem to like the format of my json. Do I need to flatten it out using a JoltTransformation or what is the best approach? If yes, how do I use the JoltTransformation to get this in the right format?


Thanks a lot in advance

Don't have an account?
Coming from Hortonworks? Activate your account here