Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Problem : while parsing JSON formatted CSV file using Nifi ?

avatar
Rising Star

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

48408-screenshot-from-2018-01-12-153425.png

I would appreciate for help me.

Thanks !

1 ACCEPTED SOLUTION

avatar
Master Guru
@Surendra Shringi

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.

View solution in original post

2 REPLIES 2

avatar
Master Guru
@Surendra Shringi

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.

avatar
Rising Star

Thanks @Shu

For such a nice help.