简体   繁体   中英

Talend + lookup

I'm starting to learn Talend and I'm facing this problem: I need to compare the column "Departamento" from the excel (input) with my static table db "Departamento" (input) in order to obtain IdDepartmento and insert it into the table Direccion(output)

地图

工作

How may I achieve this?

Thanks!

  • InputA: Excel file
  • InputB: DB table
  • OutputC: DB Table

Job Graph:

Input A ---+
           |
           +---- tMap ---- Output
           |
Input B ---+

Please use below approach- Input1: Excel file Input2: DB table Output: DB Table

Join input1 and input2 with a tMap. Make sure input2 becomes lookup flow and input1 as main flow. Then apply below settings. 1) compare Departamento & description. 2) set join type as left outer join 3) Fetch IdDepartmento now connect the output flow to your DB output component.

I believe by this you must have got your solution.

Well the Query you have written must have given Error... because it does not know what row4.somefield is. It only takes variables at the component and it does not look like variable so far.

Anyway here is how you can achieve your target 1)excel input as main 2)dbinput as lookup and connect it to tMap component and make the Innerjoin base on the condition that you have written as sql

configure your output and what field you need and 3) Connect the component to the DBoutput component...and here you get the result.

Plz put your commemnts.

在tmap内的输出过滤器编辑器中,您实际上可以指定查找和主表之间的条件,例如“ row1.yourcolumname = row2.yourcolumnname”,其中row1是您的主表,而row2是您的查找表。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM