One Star

Standed Email Formate

Hi All,
How to find the given email_address is valid or in valid in talend
Is there any function to follow the standed email formate ?


Re: Standed Email Formate

Write a customm routine to check if email address is valid. Use the following code in the routine
String email = ?;
Pattern p = Pattern.compile(?.+@.+\\.+?);
Matcher m = p.matcher(email);
boolean matchFound = m.matches();
System.out.println(?EMAIL OK?);
System.out.println(?EMAIL ERROR?);

Tweak the code according to your needs.
Call this function/routine in more than one jobs to check if ail is valid.
Let me know if you face any issues.

Re: Standed Email Formate

Forgot to mention that you will also have to import java.util.regex.* class in the routine.
One Star

Re: Standed Email Formate

Hi vikram thanks for your reply .
Table contains 2 laksh records and field name is email_address.
if record contain valid email_address i want to process to target table
and also in-valid email_address i want to process target table and updating with some flag=0,

how it is possible in talend?
Four Stars

Re: Standed Email Formate

Hi Aishu,
Based on your description, your job is now simple... it contains just simple insert.
Use code given by Vikram to set the flag status to 0 or 1 in context variable before tMap component
Use tMap to add flag column
Hope this is what you are looking for.