How to handle "\" character in passwords in context variables?

One Star

How to handle "\" character in passwords in context variables?

Hi,
I have a password which contains special character \ (backslash).
When I use the password at the component (tMSSQLInput) level by typing it in the password with extra escape characters, it is working.
for e.g. suppose my password is abcd\efg. When I type the password in Password textbox as "abcd\\efg" in component property, it is able to login to the MSSql server.
But when I define a context variable for password and use the variable in the component property, it is giving me error ie. login failed. I think this is because Talend is not taking the password in a proper way due to \ (backslash). I tried to prefix another \ in the context variable, but it is not working.
Is there any solution to this apart from changing the password itself?
Regards,
Keyur
Moderator

Re: How to handle "\" character in passwords in context variables?

Hi,
What's the login failed info? Password is invalid?
Is it working when you use implicit context load? Save a password with "\" in specified file and pass it into DB component setting?
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.

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

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog