tMSSqlOutput how to insert new records and update existing ones.

One Star

tMSSqlOutput how to insert new records and update existing ones.

Action on data : insert  - adds all the records again
Action on data : update - updates only existing ones but do not add new records
Action on data : insert/update - adds all the records again same as insert
For example table is
123 abc
124 dbc 
after insert
123 abc
124 dbc 
123 abc
124 dbc 
I have primary keys at sql tables and Identity specification > Is identity > YES
tMSSqlOutput >Advanced settings > use field options > primary key field:  update key , deletion key checked, updatable & insertable unchecked
Best Regards
Cihan
Moderator

Re: tMSSqlOutput how to insert new records and update existing ones.

Hi,
What's the primary key in schema setting? Have you tried to use Action on data: update/insert? What does your expected result look like?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: tMSSqlOutput how to insert new records and update existing ones.

Hello,
Thank you for your reply.
I tried action on data update/insert or insert/update , it adds all the data to sql table again.
You can see the sql table , talend job and settings.
Is there a way to write only the new data to database & if the data is same, keep the existing rows?


Best Regards
Cihan

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

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog