- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Problem : while parsing JSON formatted CSV file using Nifi ?
- Labels:
-
Apache NiFi
Created on 01-12-2018 10:09 AM - edited 08-18-2019 01:07 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi folks,
I am facing issue in Nifi while parsing JSON formatted CSV file, which processor should be selected or not. i have attached input file, you can go through and let me know.
My output should be like
Name : abc
Age : 24
Address_city : chennai, Address_state : TN, Address_zipcode : 600234
I would appreciate for help me.
Thanks !
Created 01-13-2018 05:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The question got addressed here https://community.hortonworks.com/questions/159780/parse-file-in-nifi.html
Need to make some config changes to the processors that are used in the above community link to work with the sample data.
Changes in Extract Text processor:-
Change existing Age,Name Property values in Extract text processor
Age
\|.*\|(.*?)\|
Name
\|(.*?)\|
Add new id property as
id
^(.*?)\|
Changes in Replace text:-
Change the below property
Replacement Value
${id},${Name},${Age},${Address_city},${Address_state},${Address_zipcode}
I think these are the changes you need to make to work the NiFi process to work with your input data.
Created 01-13-2018 05:32 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The question got addressed here https://community.hortonworks.com/questions/159780/parse-file-in-nifi.html
Need to make some config changes to the processors that are used in the above community link to work with the sample data.
Changes in Extract Text processor:-
Change existing Age,Name Property values in Extract text processor
Age
\|.*\|(.*?)\|
Name
\|(.*?)\|
Add new id property as
id
^(.*?)\|
Changes in Replace text:-
Change the below property
Replacement Value
${id},${Name},${Age},${Address_city},${Address_state},${Address_zipcode}
I think these are the changes you need to make to work the NiFi process to work with your input data.
Created 01-13-2018 05:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks @Shu
For such a nice help.