Run-if from DbInput to tMap

Highlighted
Four Stars

Run-if from DbInput to tMap

Think about this scenario: 

 

1. If the balance of an entry is positive, do some transformation (mapping), and then save the entry into Accounts Payable,

2. if the balance is negative,do another transformation (mapping), and then save the entry into Accounts Receivable

 

I am trying to use run-if but I am unable to connect the run-f from DbInput to tMap. i can only connect the run-if to a tMsgBox. I am wondering why is that and how to achieve my goal. Very new to Open Studio. Thank you all in advance!


Accepted Solutions
Nine Stars

Re: Run-if from DbInput to tMap

@Dustin ,

 

That is because tMap has to receive some input from its upstream components. If you are trying to invoke tMap on Run If, it is not receiving any data to process.
So pass the main rows to tMap and create 2 output groups in tMap like shown below using the filter option (where i have added conditions row3.Balance >=0 and row3.Balance <0) to split the data into 2 groupsTMap.PNG

 

And map the outputs from TMap to corresponding TDbOutput or whatever you want to do.

View solution in original post


All Replies
Nine Stars

Re: Run-if from DbInput to tMap

@Dustin ,

 

That is because tMap has to receive some input from its upstream components. If you are trying to invoke tMap on Run If, it is not receiving any data to process.
So pass the main rows to tMap and create 2 output groups in tMap like shown below using the filter option (where i have added conditions row3.Balance >=0 and row3.Balance <0) to split the data into 2 groupsTMap.PNG

 

And map the outputs from TMap to corresponding TDbOutput or whatever you want to do.

View solution in original post

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

Best Practices for Using Context Variables with Talend – Part 3

Read about some useful Context Variable ideas

Blog