Five Stars

What is the difference between tFilterRow and filter in tMap?

Hi,
What is the difference between tFilterRow and filter in tMap? We can use tFilterRow in front of tMap to filter records. So, Why do we need a filter in tMap?
3 REPLIES
Moderator

Re: What is the difference between tFilterRow and filter in tMap?

Hi,
What is the difference between tFilterRow and filter in tMap? We can use tFilterRow in front of tMap to filter records. So, Why do we need a filter in tMap?

It depends on your job requirement. In tMap, there is also ternary if-else operator. The expression is Condition?value if true: value if false
tMap is an advanced component which can transform and route data from single or multiple sources to single or multiple destinations. You can add filter on tMap to filter multiple sources at the same time.

Usually, we use tFilterRow to filter input rows by setting one or more conditions on the selected columns(one source).
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.
Five Stars

Re: What is the difference between tFilterRow and filter in tMap?

Hi Sabrina,
Can i have a sample example for "You can add filter on tMap to filter multiple sources at the same time."
For Example,
I have source1 column data 1,2,7
I have source2 column data 3,4,9
Can i write a filter condition "data <= 5 " at a single place or it has to be written in both the input tables of tMap?
Moderator

Re: What is the difference between tFilterRow and filter in tMap?

Hi,
You can use tfilterrow to achieve your job:
tfileinput(source1)-->tfilterrow-->output
tfileinput(source2)-->tfilterrow_2-->output
Or use tMap
tfileinput(source1)-->tMap-->output1
tfileinput(source2)           -->output2
If you want to add a filter on lookup, the filter in tMap component will be taken.(see my pic)
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.