Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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       |
'--------+--------+--------'
Labels (1)
1 Solution

Accepted Solutions
vapukov
Master II
Master II

each input and output flow have filter tools

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

 

0683p000009Lum7.png

View solution in original post

5 Replies
vapukov
Master II
Master II

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

 

0683p000009LuZU.png

Anonymous
Not applicable
Author

Great! How do you set up multiple filters?

vapukov
Master II
Master II

each input and output flow have filter tools

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

 

0683p000009Lum7.png

Anonymous
Not applicable
Author

Found what I was looking for in the retired forum thread: https://community.talend.com/t5/Design-and-Development/If-Statement-tMap-Expression-Builder/td-p/206...

 

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

 

0683p000009Lul4.png

Anonymous
Not applicable
Author

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