Identify special character in row

Highlighted
Five Stars

Identify special character in row

I have a csv file. From that i want to find whether a data is having special characters or not. If special character is available then i want that row number,data and some message to be printed into output.Suppose i have 3 columns ID,First_Name,Last_Name in CSV. While reading data from CSV, i want to check whether first_name is having special characters or not. similar check for last name. If special characters is available for a data in First_Name(eg: Te$t), then i want message like 1-Te$t - Special character in first_name column. Similar to what tSchemaComplianceCheck component is doing and is it possible to do the above scenario in tSchemaComplianceCheck  component?.


Accepted Solutions
Employee

Re: Identify special character in row

Hi Rathesh,

 

      You can add a sequence in tmap to allocate the row number for each row. 

 

       For checking a name is containing only alphabetic values, you can use StringHandling.IS_ALPHA("abc") function present in tmap.This will give a boolean result. If the boolean result is false, you can pick those record as bad record and process them further.

 

Warm Regards,

 

Nikhil Thampi


Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)

All Replies
Employee

Re: Identify special character in row

Hi Rathesh,

 

      You can add a sequence in tmap to allocate the row number for each row. 

 

       For checking a name is containing only alphabetic values, you can use StringHandling.IS_ALPHA("abc") function present in tmap.This will give a boolean result. If the boolean result is false, you can pick those record as bad record and process them further.

 

Warm Regards,

 

Nikhil Thampi


Warm Regards,
Nikhil Thampi
Please appreciate our members by giving Kudos for spending their time for your query. If your query is answered, please mark the topic as resolved :-)

Cloud Free Trial

Try Talend Cloud free for 30 days.

Tutorial

Introduction to Talend Open Studio for Data Integration.

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.