• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] extracting substring using tfilter

#1 2012-01-31 08:05:56

cs_enthusiasist
Member
Registered: 2011-12-05
Posts: 43

[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[tcp:22]'   ....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.

Offline

#2 2012-01-31 08:35:25

pedro
Member
Registered: 2011-11-17
Posts: 3682

Re: [resolved] extracting substring using tfilter

Hi

tFilterRow component can't extract fields.
You can use tFilterRow to check particular case.

Code:

input_row.columnName1.startsWith("ipv4address")

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

Regards,
Pedro


Only Paranoid Survive.

Offline

#3 2012-01-31 12:25:05

cs_enthusiasist
Member
Registered: 2011-12-05
Posts: 43

Re: [resolved] extracting substring using tfilter

thanks a lot!!

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] extracting substring using tfilter

Board footer

Powered by FluxBB