Skip to content

DOC: mssql-python driver API documentation for Bulk Copy#454

Closed
subrata-ms wants to merge 5 commits intomainfrom
subrata-ms/bulkcopy_doc
Closed

DOC: mssql-python driver API documentation for Bulk Copy#454
subrata-ms wants to merge 5 commits intomainfrom
subrata-ms/bulkcopy_doc

Conversation

@subrata-ms
Copy link
Contributor

@subrata-ms subrata-ms commented Feb 26, 2026

Work Item / Issue Reference

AB#42835


Summary

This pull request adds comprehensive documentation for the new bulkcopy() API on the Cursor object, detailing its usage, parameters, error handling, connection requirements, and performance tips. The documentation is designed to help users understand and effectively use the high-performance bulk data loading feature for SQL Server and Azure SQL.

Bulk Copy API Documentation:

  • Introduced BULKCOPY_API.md with a detailed overview of the bulkcopy() method, including its benefits, method signature, parameters, and return values.
  • Provided extensive usage examples covering basic inserts, column mapping, performance options, error handling, and advanced scenarios.
  • Explained internal architecture, connection string requirements, and keyword translation for the bulk copy operation.
  • Included performance tips and requirements to optimize bulk data loading and ensure compatibility.
  • Linked to related documentation and resources for further information and context.

@github-actions github-actions bot added pr-size: medium Moderate update size labels Feb 26, 2026
@subrata-ms subrata-ms marked this pull request as ready for review February 26, 2026 08:09
Copilot AI review requested due to automatic review settings February 26, 2026 08:09
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a standalone API reference for the Cursor.bulkcopy() feature to help users understand how to perform high-throughput bulk loads via mssql-python/mssql_py_core.

Changes:

  • Introduces BULKCOPY_API.md describing Cursor.bulkcopy() usage, parameters, return shape, and examples.
  • Documents connection-string handling/keyword forwarding and internal “separate connection” behavior.
  • Adds performance guidance and operational notes for bulk-loading scenarios.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

> **Availability:** Requires the `mssql_py_core` native extension (bundled with the `mssql-python` wheel).

---
## Key Benefits
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Key benefits are not really required in this doc unless others feel differently. This is a better candidate for blog post.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be good to have as user should be aware of the properties/efficiency of the BCP. But this is surely a good candidate for Blog too.

@github-actions
Copy link

github-actions bot commented Feb 27, 2026

📊 Code Coverage Report

🔥 Diff Coverage

100%


🎯 Overall Coverage

76%


📈 Total Lines Covered: 5579 out of 7258
📁 Project: mssql-python


Diff Coverage

Diff: main...HEAD, staged and unstaged changes

No lines with coverage information in this diff.


📋 Files Needing Attention

📉 Files with overall lowest coverage (click to expand)
mssql_python.pybind.logger_bridge.hpp: 58.8%
mssql_python.pybind.logger_bridge.cpp: 59.2%
mssql_python.row.py: 66.2%
mssql_python.pybind.ddbc_bindings.h: 67.8%
mssql_python.pybind.ddbc_bindings.cpp: 69.7%
mssql_python.pybind.connection.connection.cpp: 75.3%
mssql_python.ddbc_bindings.py: 79.6%
mssql_python.pybind.connection.connection_pool.cpp: 79.6%
mssql_python.cursor.py: 84.8%
mssql_python.__init__.py: 84.9%

🔗 Quick Links

⚙️ Build Summary 📋 Coverage Details

View Azure DevOps Build

Browse Full Coverage Report

@sumitmsft sumitmsft closed this Feb 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-size: medium Moderate update size

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants