One Star

tMap multiple filtering conditions

My job contains a couple of inputs, tMap and a excel output. The input tables are Customers,Orders and OrderCateogry. The output columns are to be as follows
CustomerName|TotalOrders|OrdersforHDTV|OrdersforLaptop
How do I implement multiple filters within tMap or could you suggest a better way of accomplishing this.
Thanks
5 REPLIES
Community Manager

Re: tMap multiple filtering conditions

hi
How do I implement multiple filters within tMap or could you suggest a better way of accomplishing this.

What are you expected situation? You can add multiple filters on tMap like this:
row1.name.equals("shong")&&row1.id>3
or
row1.name.equals("shong")||row1.id>3
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tMap multiple filtering conditions

I would like 2 output columns filtered by different criteria on the same input column
One with
row1.name.equals("shong")
Other with
row1.name.equals("BI4better")
Community Manager

Re: tMap multiple filtering conditions

Hi
Can you give us an exmaple? What are the incoming record and output result?
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tMap multiple filtering conditions

Let's say the input to tMap are Customers, Orders & OrderCategory.
OrderCategory would contain categories as Store and Online.
The output file needs to display the following
CustomerName| TotalNumberofOrders | NumberofStoreOrders | NumberofOnlineOrders
Thanks for your quick response
Community Manager

Re: tMap multiple filtering conditions

Hi
Just do some inner join on tMap between the three input tables. Can you give us a specific example? I will show you a demo job
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business