Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Rathesh
Contributor
Contributor

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?.

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable

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

1 Reply
Anonymous
Not applicable

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