Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

How to remove ETX character from json value ?

avatar
Contributor

Hello,

I could not split a JSON due to a special ETX character existing in a JSON value, SplitJson processor returns an error that it is not a Valid JSON.

The JSON looks like that:
[ {"key_data":"val_data"},

 {"key_data":"val_ETXdata"},

 {"key_data":"val_data"},

 {"key_data":"val_data"},... ]

 

Ghilani_1-1668002267091.png

I used The next regex expression to replace it but it doesn't work:

\x03(?=[^"]*")
also
[\x03](?=[^"]*")
 
can someone show me a trick to remove it please, I would appreciate it.

 

 

 

10 REPLIES 10

avatar
Contributor

I think everything works fine, the json flowfiles are the response of an invokeHttp request to an API, I receive more than 5000 flowfiles, each flowfile contains 200 records.
Problems happen only with 4 files that contain the ETX symbol.