Filter rows based on more the two condition.

Seven Stars

Filter rows based on more the two condition.

Hi,

 

i have a table where source id is one column having multiple sources like below, i want to have multiple outputs based on different ids

i want to create two flow where one output table/file will contain all the data with source-id(1,2,4) and other output table/file  will have (3)

Input               

source-id Name
4test
1hello
2first
2first
3three
1hello
4test
2first

 

Out1(1,2,4)                                                

source-id Name
1hello
2first
2first
1hello
4test
2first

                                       

           

Out_2(3)

source-id Name
3three

 

Regards


Accepted Solutions
Forteen Stars

Re: Filter rows based on more the two condition.

@sbxr ,check the below way.

Untitled.pngUntitled.png

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

View solution in original post

Sixteen Stars TRF
Sixteen Stars

Re: Filter rows based on more the two condition.

Here is an example:

2019-09-11 13_49_55-Talend Open Studio for ESB - tMap - tMap_2.png

Define 2 output flows into the tMap.

For the 1rst one, define an expression filter as "row5.sourceId != 3" (for example). 

For the 2nd one, just set the Catch output reject option to true.


TRF

View solution in original post


All Replies
Sixteen Stars TRF
Sixteen Stars

Re: Filter rows based on more the two condition.

Use tFilterRow (or tMap with according expression on output filter if you have something to transform)

TRF
Highlighted
Seven Stars

Re: Filter rows based on more the two condition.

Yes thank you , but how to implement above in tmap filter
what and how the condition i need to write.
Forteen Stars

Re: Filter rows based on more the two condition.

@sbxr ,check the below way.

Untitled.pngUntitled.png

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.

View solution in original post

Sixteen Stars TRF
Sixteen Stars

Re: Filter rows based on more the two condition.

Here is an example:

2019-09-11 13_49_55-Talend Open Studio for ESB - tMap - tMap_2.png

Define 2 output flows into the tMap.

For the 1rst one, define an expression filter as "row5.sourceId != 3" (for example). 

For the 2nd one, just set the Catch output reject option to true.


TRF

View solution in original post

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog