Correct use of tMSSqlLastInsertId (fix always returns zero)

Highlighted
Seven Stars

Correct use of tMSSqlLastInsertId (fix always returns zero)

 To use tMSSqlLastInsertId correctly, you must disable "Use Batch Size" in the tMSSqlOutput component that does the insert.  Otherwise, the last_insert_id value will always be zero.

 

NOTE:  All kudos for this goes to Carl Bekwam Bekwam Blog: tMSSqlLastInsertId Returns 0.  I added here because I didn't see it and felt it was helpful for the community.

 

Moderator

Re: Correct use of tMSSqlLastInsertId (fix always returns zero)

Hello,

Thanks for sharing it on forum.

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.

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch