Filter data on first character in Talend

One Star

Filter data on first character in Talend

Hi,
I have an input flat file data coming as below and I need to filter data based on first character such as "R" and "S" in talend.
Can anyone please suggest me.
Sample data:
R01
R02
R03
S01
S02
S03
S04
S05
Thanks,
Yugandhar
Moderator

Re: Filter data on first character in Talend

Hi,
Do you need to filter the row with non-integer value for your column or just filter the row which starts with "S" or "R"?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Filter data on first character in Talend

Hi,
I want to filter the row which starts with "S" or "R.

Thanks,
Yugandhar
Moderator

Re: Filter data on first character in Talend

Hi,
You can achieve your goal in tMap component by using this filter:
row1.newColumn1.startsWith("S")||row1.newColumn1.startsWith("R")
Let us know if it is OK with you.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Filter data on first character in Talend

Thank you Sabrina!
Moderator

Re: Filter data on first character in Talend

Hi,
Thanks for your feedback. Feel free to mark this topic as resolved.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.