Ask Your Question

How to remove '\n' from the result dataset

asked 2018-01-16 04:32:13 -0600

Shruthi gravatar image

updated 2018-01-29 07:11:14 -0600

I am fetching data from customer table using JDBC query consumer. My data contains many fields and one of the field is 'Address' of customers. When i fetch these data i get '\n' in my output file specifically in 'Address' field

i.e, My fields appear like as shown below,

Name |Age |Address

A        10        104,1st cross
                   20th main road,

In my destination file it appears like

Name |Age |Address

A        10         104,1st cross \n 20th main road,xxxx

How can i remove that '\n' from my output file?

Thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-01-16 10:58:28 -0600

todd gravatar image

You could try adding and configuring an Expression Evaluator stage which parses and updates the Address field

Output Field could be /Address or a new field such as /NewAddress

and Field Expression

${str:replaceAll(record:value('/Address'), str:unescapeJava('\\\\n'), "")}


edit flag offensive delete link more



It worked.. Thank you so much

Shruthi gravatar imageShruthi ( 2018-01-16 23:39:05 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-01-16 04:32:13 -0600

Seen: 274 times

Last updated: Jan 29 '18