[resolved] extracting substring using tfilter

hi,
my requirement is this,
i have an address field coming from toracleinput.
i need to check for some cases like :
1)if it contains 'ipv4address'
2)if it contains 'samemsaddress'
etc.
For each of the above case I have to perform different transformations which would be to EXTRACT THE IP-ADDRESS FROM the address field itself..
initially, i thought of doing this...write multiple condition in tfilterrow with OR as logic condition...and then perform operation based on which condition is satisfied...BUT HOW DO I EXTRACT SUBSTRING USING TFILTERROW??I am not able to write the condition in tfilterrow : if(row1.address.contains("some_string"))

ex) if the address field is: 'ipv4address:10.113.20.1' ....then i need to extract 10.113.20.1 from it...
I want to implement this without using tJava ie I want to make this fully automated using the talend components.
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] extracting substring using tfilter

Hi
tFilterRow component can't extract fields.
You can use tFilterRow to check particular case.
input_row.columnName1.startsWith("ipv4address")

In fact, the best way is to use tExtractRegexFields which can filter and extract address.
Regards,
Pedro
2 REPLIES
One Star

Re: [resolved] extracting substring using tfilter

Hi
tFilterRow component can't extract fields.
You can use tFilterRow to check particular case.
input_row.columnName1.startsWith("ipv4address")

In fact, the best way is to use tExtractRegexFields which can filter and extract address.
Regards,
Pedro

Re: [resolved] extracting substring using tfilter

thanks a lot!!