Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Problem : while parsing JSON formatted CSV file using Nifi ?

Solved Go to solution

Problem : while parsing JSON formatted CSV file using Nifi ?

New Contributor

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

Accepted Solutions

Re: Problem : while parsing JSON formatted CSV file using Nifi ?

Super 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.

2 REPLIES 2

Re: Problem : while parsing JSON formatted CSV file using Nifi ?

Super 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.

Highlighted

Re: Problem : while parsing JSON formatted CSV file using Nifi ?

New Contributor

Thanks @Shu

For such a nice help.