Identify special character in row

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

View solution in original post


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

View solution in original post

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog