Reputation: 1
I'm very new to Talend and I have a user commented text column where a sample record like
my email_id is [email protected] and mobile_number is 9998887776
Now my requirement is to mask the email and mobile_number in such a way that email should be
e******@gmail.com
and mobile_number should be
#######776
i.e. if both email_id
and mobile_number
exists in the column , how can I achieve this.
I have tried using the expression builder with string handling functions. Can anyone explain me briefly.
Upvotes: 0
Views: 162
Reputation: 52
There's no predefined method to do this. You can create your own "routine" with methods that you can call in the talend components (e.g. in the expression editor of a tMap). A routine is basically just a Java class with static methods. You can find an example here.
With Java you have access to a lot of tools to help you with your task. I'd use Pattern Matching to find the email address and mobile number via RegEx then mask those values, but that's just one way to do it.
Upvotes: 1