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

Would be very convinent if in SqlBulkCopy, non matching column mapping exception specifies the mismatched column #3170

Open
JNjenga opened this issue Feb 20, 2025 · 0 comments
Labels
💡 Enhancement Issues that are feature requests for the drivers we maintain. 🙌 Up-for-Grabs Issues that are ready to be picked up for anyone interested. Please self-assign and remove the label

Comments

@JNjenga
Copy link

JNjenga commented Feb 20, 2025

Is your feature request related to a problem?

When doing a bulk copy, if a column mapping that has an invalid destination column name is specified, an exception is thrown. Specifically InvalidOperationException with the message The given ColumnMapping does not match up with any column in the source or destination. For tables that have a lot of columns it is really hard to zero in on the mismatching column.

You can repro this behavior by referencing the test case MissingTargetColumnTest under SqlBulkCopyTest

Describe the solution you'd like

It would be nice if the exception message gave a hint on which column had an issue. The exception message could include the name of first mismatched column name.

@JNjenga JNjenga added 💡 Enhancement Issues that are feature requests for the drivers we maintain. 🆕 Triage Needed For new issues, not triaged yet. labels Feb 20, 2025
@paulmedynski paulmedynski added 🙌 Up-for-Grabs Issues that are ready to be picked up for anyone interested. Please self-assign and remove the label and removed 🆕 Triage Needed For new issues, not triaged yet. labels Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💡 Enhancement Issues that are feature requests for the drivers we maintain. 🙌 Up-for-Grabs Issues that are ready to be picked up for anyone interested. Please self-assign and remove the label
Projects
None yet
Development

No branches or pull requests

2 participants