Filter out specific length of string in tMap

Six Stars

Filter out specific length of string in tMap

Hi,

 

Please advise me below question. Thank you 

 

I am trying to remove a string which has length of 7. For example, if PO "XXXXXXX" (7 digits) with string type, I will remove them from my report. If PO "XXXXXXXX" (8 digits) I will leave them in the report. I am not sure if Talend has a function to achieve my thought.


Accepted Solutions
Six Stars

Re: Filter out specific length of string in tMap

You could do this in the tMap by using filters. Add a filter to the output which checks if the length of the string == 8, this output would go to your report. If you wanted to send the rejects elsewhere, create a 2nd output and set 'Catach output rejects' to true.


All Replies
Six Stars

Re: Filter out specific length of string in tMap

You could do this in the tMap by using filters. Add a filter to the output which checks if the length of the string == 8, this output would go to your report. If you wanted to send the rejects elsewhere, create a 2nd output and set 'Catach output rejects' to true.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch