From Thursday, July, 9, 3:00 PM Pacific,
our Community site will be in
read-only mode
through Sunday, July 12th.
Thank you for your patience.

tMap instead of tReplicate + tFilterRow?

Highlighted
Five Stars

tMap instead of tReplicate + tFilterRow?

I have some table rows which I'm sorting into a series of tables based on the contents of a column (location).

 

My brute force method (which works) is to use tReplicate, then a separate duplicate Main threads to tFilterRow. After seeing that tMap has the ability to create multiple output flows, I've been digging through documentation to see if that could be used to output multiple filtered output flows. Is this possible?

 

EDIT: Sample Table - Goal is to output the location A lines to one output stream, location B to one, location C to another.

 

|=-------+--------+-------=|
|Location|Name    |Quantity|
|=-------+--------+-------=|
|A       |Johnson |5       |
|A       |Jackson |12      |
|B       |Johnson |23      |
|B       |Jackson |2       |
|C       |Williams|33      |
|C       |Johnson |23      |
|C       |Jackson |8       |
'--------+--------+--------'

Accepted Solutions
Highlighted
Forteen Stars

Re: tMap instead of tReplicate + tFilterRow?

each input and output flow have filter tools

You can combine conditions by && or || as many as You need

 

Screen Shot 2017-05-31 at 9.28.00 PM.png

-----------

View solution in original post

Highlighted
Five Stars

Re: tMap instead of tReplicate + tFilterRow?

Found what I was looking for in the retired forum thread: If Statement: tMap Expression Builder

 

 In the example table (which I added to the original post), the tMap would look like this:

 

tMap - Multiple Output Filters.png

View solution in original post


All Replies
Highlighted
Forteen Stars

Re: tMap instead of tReplicate + tFilterRow?

Hi,

 

yes, of course - it possible

I prefer tMap as well because it allow not only split/filter flows, but at same time make transformations 

what better - always depends from current task

 

Screen Shot 2017-05-31 at 8.17.42 PM.png

-----------
Highlighted
Five Stars

Re: tMap instead of tReplicate + tFilterRow?

Great! How do you set up multiple filters?

Highlighted
Forteen Stars

Re: tMap instead of tReplicate + tFilterRow?

each input and output flow have filter tools

You can combine conditions by && or || as many as You need

 

Screen Shot 2017-05-31 at 9.28.00 PM.png

-----------

View solution in original post

Highlighted
Five Stars

Re: tMap instead of tReplicate + tFilterRow?

Found what I was looking for in the retired forum thread: If Statement: tMap Expression Builder

 

 In the example table (which I added to the original post), the tMap would look like this:

 

tMap - Multiple Output Filters.png

View solution in original post

Highlighted
Five Stars

Re: tMap instead of tReplicate + tFilterRow?

You must have posted while I was typing my findings. Thanks for your help!

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

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