Ask Your Question
1

Can we write multiple expressions in Field Mapper?

asked 2020-03-16 09:32:08 -0500

Venkat gravatar image

updated 2020-03-24 12:43:56 -0500

metadaddy gravatar image

Can I give multiple expressions in condition expression/mapping expression in Field Mapper? If yes please provide the syntax for the multiple expressions.

Ex: mapping expression - ${str:replaceAll(f:name(), '[.\ #()^@!]','_')}

I need to write two expressions one is for special character to be remove and other one is add '-' wherever there is a space in the fields.

Ex:

  1. Streamsets# ------Target should be Streamsets
  2. Stream sets -------Target should be Stream_sets
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-03-24 12:42:43 -0500

metadaddy gravatar image

You can nest replaceAll and/or replace calls, like this:

${str:replace(str:replaceAll(f:name(), '[.\#()^@!]',''), ' ', '_')}
edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-03-16 09:32:08 -0500

Seen: 24 times

Last updated: Mar 24