Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to use tNormalize with item separator as "\n" for the string "username:test\npassword:testpwd\nerroremail:sample@email.com\nserviceno:testserv\ncarrier:\nstart:"
If I hardcode the string and assign it to a variable in tSetGlobalVar or tJava, the Normalization works and I'm getting the output as expected .
username:test
password:testpwd
erroremail:sample@email.com
serviceno:testserv
carrier:
start:
But If I read that value from the Oracle DB and then assign it to a variable
in tSetGlobalVar, then the Normalization doesn't work.
and the result is :
username:test\npassword:testpwd\nerroremail:sample@email.com\nserviceno:testserv\ncarrier:\nstart:If I try to add escape character while reading from the DB "select REPLACE(VALUE1,'\\n','\\\n') as VALUE_TXT from TABLE" , Normalization works , but with extra \ at the end of the line. ("\\n" doesn't work.)
username:test\
password:testpwd\
erroremail:sample@email.com\
serviceno:testserv\
carrier:\
start:
My requirement is to read the value from the DB , Normalize it and then write it to a file.
I'm not sure how to escape the "\" in the tNormalize.
Could someone please help to resolve this.
Thanks in advance.
Hi , you can use : "\\\\n" as item separator in the tNormalize component and don't use csv parameters in advance settings. --> "\\\\" will escape \ char and "n" add the "n" char to it. So it will use the string \n as separator instead of the \n newline
Send me Love and kudos
Hi,
Thank you so much. Its working now after adding "\\\\n" as item separator.
U're welcome