Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Support for UPSERT operations using BulkCopy #1101

Open
pkgajulapalli opened this issue Jul 1, 2019 · 3 comments
Open
Labels
Enhancement An enhancement to the driver. Lower priority than bugs.

Comments

@pkgajulapalli
Copy link

Support for UPSERT operations using BulkCopy

As of now we can bulk copy data from one db system to sql server. But in this approach, the process fails if a primary key constraint is violated. There is no option to implement upsert kind of operation in the current setup.

Preferred solution

It would be cool if the SQLServerBulkCopyOptions has a parameter like updateIfExists. Using this parameter, users can choose whether to fail the bulk copy or proceed with updating the rows.

@pkgajulapalli pkgajulapalli added the Enhancement An enhancement to the driver. Lower priority than bugs. label Jul 1, 2019
@gordthompson
Copy link
Contributor

This issue needs a more descriptive title.

@pkgajulapalli pkgajulapalli changed the title [FEATURE REQUEST] [FEATURE REQUEST] Support for UPSERT operations using BulkCopy Jul 2, 2019
@ulvii
Copy link
Contributor

ulvii commented Jul 2, 2019

Hi @pkgajulapalli,
We will investigate and get back to you.

@ulvii
Copy link
Contributor

ulvii commented Jul 7, 2020

Hi @pkgajulapalli ,
Apologies for the delay, I got carried away with other features and this issue escaped my attention.

Looks like there is no way achieving this using SQL Server bulk load feature. The only close alternative would be using temporary tables and merge command, which would be almost a new feature separate from bulk copy from driver point of view.

@github-project-automation github-project-automation bot moved this to To be triaged in MSSQL JDBC Aug 28, 2024
@Jeffery-Wasty Jeffery-Wasty moved this from To be triaged to Backlog in MSSQL JDBC Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement An enhancement to the driver. Lower priority than bugs.
Projects
Status: Backlog
Development

No branches or pull requests

3 participants