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.

How to modify text in csv file in Apache Nifi

Highlighted

How to modify text in csv file in Apache Nifi

Explorer

I have a csv file which has many lines of data and many fields, but whenever i have a file which has "9799678467\" under "boardingPointContactNo" field it throws error.

 

I want to replace "9799678467\"  with "9799678467". I want to remove the "/" . Which processor should i be used to do this. 

 

This is the snippet of my csv data. 

serviceProviderName,serviceId,routeId,busType,sourceLocation,sourceLocationId,boardingPointId,boardingPointContactNo    {fields}

"abc travels and Cargo","106123","15476562","A/C Sleeper   (2+1)","Surat","473","21765854","9799678467\"                   {values of each field}

 

As you can see the data is comma separated.

Thanks in advance

 

 

1 REPLY 1

Re: How to modify text in csv file in Apache Nifi

The solution you are looking for is:  ReplaceText:

 

https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.12.0/org.apach...

 

You can find loads of examples here in the forum with this search:

 

https://community.cloudera.com/t5/forums/searchpage/tab/message?advanced=false&allow_punctuation=fal...

 

 

If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.

 

Thanks,

Steven

 


 


If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.  


 


Thanks,



Steven

Don't have an account?
Coming from Hortonworks? Activate your account here