Comma inside data field is the common scenario while dealing with flat files such as CSV. Before loading, most of the project cleanse the data by removing the comma. But what if it is mandatory to retain that extra comma in data?

Simple solution : Regular Expression

Data

REGEX JAVA

RESULT

JAVA MR

Spark Scala

 

 

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.