Member-only story

Talend ETL — Email Validation

Ryan Arjun
2 min readMar 16, 2020

--

If you are working as Talend ETL and before load the data into target tables, you have to do some data cleansing kind of stuffs such as Email data validation. The question is “How to verify that the email address column’s data is having @ or [.]” if not then load rejected data on different table.

As an addition to that Talend supplies many Apache Commons libraries which have hundreds of really useful, efficient and community (Java community) checked/built solutions. The Apache Commons Validator library comes with a whole host of validation methods for Emails, Phone Numbers, URLs, etc.

Processing file data — We are using the below data to validate the correct email.

Id, Name, Age, Email

201,Ryan Arjun, 22, Ryan.Arjun@gmail.com

202,Mini Cooper,18,Mini.cooper@data.net

203,Kimmy Wang,34,Kimmy_Wang@dataspan.co.uk

204,Bill Willson,45,bill.willson@@microsoft.com

205,Donald Trump,56,donald..trump@usgov.gov

How to write Custom Code?

In the Repository, right click on Code, create a folder (here called “custom”) then right click on “custom” and create a routine then define the function to validate the email address as given below:

package routines;
import java.util.regex.*;
public class CheckEmail {
public static boolean isEmailValid(String email) {
String regex =…

--

--

Ryan Arjun
Ryan Arjun

Written by Ryan Arjun

BI Specialist || Azure || AWS || GCP — SQL|Python|PySpark — Talend, Alteryx, SSIS — PowerBI, Tableau, SSRS

No responses yet