Created 10-12-2017 10:59 AM
Hello All,
I want to flatten json records using nifi. The records are store in kafka as AVRO. I use the ConsumeKafkaRecord processor to convert avro to json. For flattening I would like to use the JoltTransformJSON processor, but this doesn't work since it expect as input a single json and not an array of json records.
Any ideas, how I can do this ?
Ideally is that I don't have to convert the records to json, but it seems that currently there is no processor to flatten avro.
Regards,
Chris
Created on 10-12-2017 12:37 PM - edited 08-17-2019 07:47 PM
After convert Avro to json processor use SplitJson processor with below configurations in it, if your data is having json Array then SplitJson processor split the array and every flowfile would be single record.
then use JoltTransform processor to flatten the json record.
Flow:-
ConsumeKafka--> convertAvroToJSON-->SplitJSON-->JoltTransform
Created 10-12-2017 12:50 PM
I have done this, but this gives performance issues.
I found how to do this with the JoltTransform processor.
Created 04-22-2019 11:58 AM
could you please share the nifi template for this. I am not able to achieve this.