I am reading data from an API - its a complex json with multiple nested fields and array of structs. The number of fields within the array is dynamic. How can i flatten this json into csv using Nifi?
I tried multiple options like Evaluatejsonpath - splitjson-replacetext/ evaluatejson-splitjson-convertrecord/evaluatejson-splitrecord-replacetext.
The avro schema for the json is different for each record, so how i can use Inferavroschema and then convert the record into a csv accordingly? Not very familiar with the jolt transform options
Appreciate any inputs/pointers. @mburgess please guide..
Thanks in advance
First question: How would you do this outside Nifi?
I'm not sure if think the transformation from a Json with variable fields to a CSV is formally defined on a conceptual level. So finding a solution may not be trivial.
If you happen to find a script in python or so that has a decent implentation, then possibly the recommended course of action would be to let Nifi use that script.