Skip to main content
FediMannoubi
Gold ⭐️
June 15, 2022
Solved

NIFI - ReplaceText crashs my csv file

Hi,

I am getting a csv without a header then adding a header with ReplaceText to it after the ReplaceText the header is added but the rest is crashed.

PS: This problem happen with this file only I tried the flow with other csv files and worked fine, can this be a csvReader problem or configuration on the encoding ?

 

Before :

FediMannoubi_1-1655287207809.png

The replace : 

FediMannoubi_2-1655287259792.pngFediMannoubi_3-1655287274126.png

 

After :

FediMannoubi_0-1655287028190.png

SAMSAL
SAMSALAnswer
Platinum ⭐️⭐️⭐️
June 15, 2022

Hi,

It could be an encoding issue that I faced a while back. please check out this post:

https://community.cloudera.com/t5/Support-Questions/Illegal-Arg-Exception-when-parsing-CSV-file-though-the-split/td-p/300565

 

Try to change the character set to UTF-16 to see if that will work. Hope that helps.

Thanks

 

2 replies

SAMSAL
SAMSALAnswer
Platinum ⭐️⭐️⭐️
June 15, 2022

Hi,

It could be an encoding issue that I faced a while back. please check out this post:

https://community.cloudera.com/t5/Support-Questions/Illegal-Arg-Exception-when-parsing-CSV-file-though-the-split/td-p/300565

 

Try to change the character set to UTF-16 to see if that will work. Hope that helps.

Thanks

 

Translate
FediMannoubi
Gold ⭐️
June 15, 2022

I used ConvertCharacterSet and changed the oncoding from UTF-16 to UTF-8 and that fixed for me Thanks

Translate