Created on 01-12-2018 10:09 AM - edited 08-18-2019 01:07 AM
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
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
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
Thanks @Shu
For such a nice help.