Ask Your Question

How to add a comma between 2 strings using concat in StreamSets Data Collector

asked 2020-01-29 00:26:33 -0600

Kalaivani gravatar image

updated 2020-01-29 13:46:41 -0600

metadaddy gravatar image

I'm trying to add comma between 2 fields. 1st field is a and 2nd field is b. I want my output as a, b

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-01-29 13:46:22 -0600

metadaddy gravatar image

You don't need to use concat, you can just reference two fields in an Expression Evaluator Field Expression like this:

${record:value('/f1')}, ${record:value('/f2')}


image description

In preview:

image description

If you really want to use concat, you can do the same by nesting the concat calls:

${str:concat(str:concat(record:value('/f1'), ', '), record:value('/f2'))}
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-01-29 00:26:33 -0600

Seen: 109 times

Last updated: Jan 29