• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] row length and number of words in a row

#1 2012-02-06 13:45:27

kavita12345
New member
Registered: 2012-02-01
Posts: 7

[resolved] row length and number of words in a row

Hi all,

I'm using tFileInputPositional to process a fixed length file and connecting it to tMap for transformation but I want to neglect/reject the rows which are having less than 10 fields in them or rows having length less than 100 before sending them to tMap. Can anyone please tell me how to do that.

Thanks in advance. smile

Offline

#2 2012-02-06 22:31:49

JohnGarrettMartin
Member
Registered: 2009-01-07
Posts: 762

Re: [resolved] row length and number of words in a row

use the tMap output filter to enter the conditions on which you want to reject the row.

Offline

#3 2012-02-07 06:18:42

kavita12345
New member
Registered: 2012-02-01
Posts: 7

Re: [resolved] row length and number of words in a row

Actually i want to reject the rows having less than 10 words. Is there any method to split the row and then count the number of words returned after the split. (as we do in java line.split("\\s+").length )

Offline

#4 2012-02-09 06:07:50

kavita12345
New member
Registered: 2012-02-01
Posts: 7

Re: [resolved] row length and number of words in a row

@JohnGarrettMartin  thanks for the reply.
Talend stores row as a structure not string so it cannot be split further and also i dont think there is any function to split.

I'm using some other conditions on fields instead of having conditions on entire row and its working fine smile .

Offline

#5 2012-02-09 10:49:22

kavita12345
New member
Registered: 2012-02-01
Posts: 7

Re: [resolved] row length and number of words in a row

tjavarow has line field in its schema and length , split any java String function can be used on it.

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] row length and number of words in a row

Board footer

Powered by FluxBB