Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[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. 0683p000009MACn.png
Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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

View solution in original post

7 Replies
Anonymous
Not applicable
Author

use the tMap output filter to enter the conditions on which you want to reject the row.
Anonymous
Not applicable
Author

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 )
Anonymous
Not applicable
Author

@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 0683p000009MACn.png .
Anonymous
Not applicable
Author

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

@kavita12345 

Can you please share the condition which you used to achieve the Requirement. in my case i have to filter the rows which has length more than 100.

 

Thanks in advance.

nar
Contributor
Contributor

@kavita12345 

Can you please share the condition which you used to achieve the Requirement. in my case i have to filter the rows which has length more than 100.

Thanks in advance.

akumar2301
Specialist II
Specialist II

Try Tfilterrow with
Length function