Determine if a row needs to be inserted or updated on Community Eddition of Talend

One Star

Determine if a row needs to be inserted or updated on Community Eddition of Talend

Hello,

I'm a newbie in Talend Studio solutions. I have to create an ETL which synchronizes two databases. The problem is I need to determine if a record on first database exists or not in second database.

Example:

Let's say I have 1 000 000 records in first database, let's also say that they have columns like contractor_number, contractor_name, contractor_surname, contractor_creation_date.
Now I need to sync that data with second database which is built as follows:
I have table which has columns like id, name, surname.
Now how to determine on free community edition If the row needs to be updated or inserted if it's new regarding to first database row? Also how to determine if row does not exists becaouse it has been deleted.
I attach the job which I built recently. The problem is I don't know how to now determine of what operation should be done (update, insert, delete).

As I said I'm newbie in Talend and I'll be very grateful for teaching me step-by-step of how to fix that problem Smiley Happy
Thank you!

Fifteen Stars TRF
Fifteen Stars

Re: Determine if a row needs to be inserted or updated on Community Eddition of Talend

Depending on your database you can use a merge request. Use a tOracleRow (for Oracle) for that.

TRF
Fifteen Stars TRF
Fifteen Stars

Re: Determine if a row needs to be inserted or updated on Community Eddition of Talend

I didn't saw your capture at 1rst. So as you probably have an inner join between both tables, you just need 2 output from your tMap:
- 1 for matching rows for update
- 1 for inner join rejects corresponfing to rows to be inserted into the target table

TRF

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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch