Support Questions

Find answers, ask questions, and share your expertise

Convert JSON to CSV using Nifi

I would like to convert a JSON file to CSV formatted file which is nested and also have more than 100 records using Apache nifi in HDF. I'm new to Nifi, can some one please help me like what processors to be used and how to configure them?




Super Guru

Use EvaluateJsonPath Field Style is

totalNonHeap =>$.systemDiagnostics.aggregateSnapshot.totalNonHeap

status => $.systemDiagnostics.aggregateSnapshot.status

country => $.country

Then ReplaceText to format as CSV


Then PutFile to write a file

Thanks for responding so quick. In a situation, if i have a json file I want to convert to csv file using these two processors. can you please help me in configuring these processors(i mean how do we set JSON path) and also please demonstrate with an example

Super Guru

Thats really helpful. Thanks. So at the end do we need to use MergeContent processor to get that CSV records all in one file.?


can you please help with the mergecontent processor to merge all the csv files into single csv file.


Super Guru

mergecontent will put all the csv records in one file




I'm able to zip all those into a Zip file.

but i'm trying to merge all those csv files into a single CSV file like an Excel sheet.


New Contributor

How to configure merge record inorder to merge the multiple flowfile having content as

a|1  and the other flow files like b|2 ..etc

I need to merge them and get it as



where as i get a|1b|2