- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Convert JSON to CSV using Nifi
- Labels:
-
Apache NiFi
Created ‎10-28-2016 02:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Thanks,
Rahul
Created ‎10-28-2016 06:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use EvaluateJsonPath Field Style is
totalNonHeap =>$.systemDiagnostics.aggregateSnapshot.totalNonHeap
status => $.systemDiagnostics.aggregateSnapshot.status
country => $.country
Then ReplaceText to format as CSV
${'status'},'${'country'}','${'totalNonHeap'}'
Then PutFile to write a file
Created ‎10-31-2016 02:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Created ‎10-31-2016 04:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Created ‎10-31-2016 05:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thats really helpful. Thanks. So at the end do we need to use MergeContent processor to get that CSV records all in one file.?
Created ‎10-31-2016 07:23 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
can you please help with the mergecontent processor to merge all the csv files into single csv file.
Thanks
Created on ‎11-01-2016 05:00 PM - edited ‎08-18-2019 05:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
mergecontent will put all the csv records in one file
done
Created ‎11-02-2016 08:36 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
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.
Thanks
Created ‎04-16-2020 01:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
a|1
b|2
where as i get a|1b|2
