[resolved] Parsing String (removing unicode 0xb)

One Star

[resolved] Parsing String (removing unicode 0xb)

Hi
Can anyone help me with this ? I'm trying to remove a unicode character (0xb) in a string(JSON) and input it in tExtractJSONfield. Is there any component that can help me do this. Thanks 
Regards,
John 
 
Moderator

Re: [resolved] Parsing String (removing unicode 0xb)

Hi,
Please take a look at tReplace component, this component is used to cleanse all files before further processing.
What does your input json file with a unicode character (0xb) look like?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Parsing String (removing unicode 0xb)

Hello Sabrina,
Good Day !
Thank you for your suggestion. Will update you if tReplace can do the cleansing, I'm looking at doing the advance mode using the regex pattern . Hoping it will work. Thanks a lot Smiley Happy
Sorry there is an error uploading the file
One Star

Re: [resolved] Parsing String (removing unicode 0xb)

Hi Sabrina, 
Good Day 
As you advised I use the tReplace to parse the json string and used the advanced setting to replace the unicode character oxb. I used this regex pattern "\\u000B" to replace the unicode  and I also tried this pattern "\u000B" but it seems that it doesn't work because I get an error on the tExtractJSONField:
Error on line 4 of document  : An invalid XML character (Unicode: 0xb) was found in the element content of the document. Nested exception: An invalid XML character (Unicode: 0xb) was found in the element content of the document. - Line: 0
Am I using the wrong regex pattern for the unicode (0xb) ?
Best Regards 
John

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Put Massive Amounts of Data to Work

Learn how to make your data more available, reduce costs and cut your build time

Watch Now

How OTTO Utilizes Big Data to Deliver Personalized Experiences

Read about OTTO's experiences with Big Data and Personalized Experiences

Blog

Talend Integration with Databricks

Take a look at this video about Talend Integration with Databricks

Watch Now