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: 
Anonymous
Not applicable

Filter out names that contain numbers

We have bad data in the First Name column that contains numbers, random series of numbers. How can I use tfilterrow to exclude these rows from mapping and loading? Thanks!

Labels (4)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

The quick way is to call the built in function on tFilterRow:
StringHanding.IS_ALPHA(input_row.columnName)==true

View solution in original post

8 Replies
Anonymous
Not applicable
Author

The quick way is to call the built in function on tFilterRow:
StringHanding.IS_ALPHA(input_row.columnName)==true
Anonymous
Not applicable
Author

Hi Shong. 

 

I tried this but am getting this error input_row cannot be resolved to a variable. See screen shot for what I did in tfilterrow.


Screen Shot 2019-12-05 at 11.49.55 AM.png
Anonymous
Not applicable
Author

Check the 'Use advanced mode' box and write the Java expression.

Anonymous
Not applicable
Author

I actually tried that first and got this error:

 

0683p000009M8gb.png

 

 

This is what it looks like in the tfilterrow:

0683p000009M8gg.png

Anonymous
Not applicable
Author

Strange I re-typed in 'StringHandling' and it worked and ran without erroring out. 

Anonymous
Not applicable
Author

Great, thanks for your feedback!

Anonymous
Not applicable
Author

Actually Shong... The filter is also removing some legitimate records because there are spaces after the first name values. Is there a way in this filter to use StringHandling.BTRIM(FRST_NAME) first to clean up the values or do i have to add another component before tfilterrow to do this first? 

Anonymous
Not applicable
Author

You should use another component such as tJavaRow or tMap before tfilterRow to do the transformation, tFilterRow is just used to filter the records.