Skip to main content
Announcements
UPGRADE ADVISORY for Qlik Replicate 2024.5: Read More
cancel
Showing results for 
Search instead for 
Did you mean: 
eksmirnova
Contributor III
Contributor III

Handle the escape character

I am looking for a recommendation regarding the "\" escape character. What we need to do in order to handle escaping the escape character.

I know we can replace that character in Qlik task but we are worried that will end up replacing characters that we do not want to be replaced.

We actually only want to replace the \ when it precedes a double quote. Is there an option to replace \ only when it precedes a double quote?

Qlik task configuration:

source - DB2, target - ADLS storage, Full load/Store changes

Labels (2)
3 Replies
Heinvandenheuvel
Specialist III
Specialist III

What have you tried? What was the result?

It would seem you need a simple transformation with <replace> as Fx.  Do NOT use <replaceChars> for this

I tried expression: replace($txt,'\"','"')
Parse, and provide: $txt = abc"abc\abc\abc\"abc\"abc   
Test, and result:          abc"abc\abc\abc"abc"abc 

 

Is that not what you want? - of course you need to replace $txt with your column name.

hth,

Hein.

john_wang
Support
Support

Hello @eksmirnova ,

Besides @Heinvandenheuvel comments, another option is using JSON/Parquet format rather than CSV as escape character is relevant to CSV format only.

Hope this helps a bit.

Regards,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!
john_wang
Support
Support

Hello @eksmirnova ,

I'd like to say thanks for you opening the ticket with sufficient and clear information! With source/target DB types, A clear description with sample... I'm sure you are Replicate expert, thank you so much for your excellent support!

Regards,

John.

Help users find answers! Do not forget to mark a solution that worked for you! If already marked, give it a thumbs up!