Skip to content

Conversation

jahnvi480
Copy link
Contributor

@jahnvi480 jahnvi480 commented Jun 25, 2025

ADO Work Item Reference

AB#34946


Summary

This pull request introduces a new BCPClient class to facilitate bulk copy operations in the mssql_python package. It includes comprehensive error handling, logging, and support for various configurations, making it easier to integrate bulk data operations with SQL Server. Additionally, the package's __init__.py file has been updated to expose the new BCP-related modules.

New Bulk Copy Functionality:

  • BCPClient class added: Implements bulk copy operations using the BCP utility, with methods for initialization and execution. It includes robust validation for input parameters (connection, options, table) and detailed logging to aid debugging.
  • Support for configuration options: The sql_bulk_copy method supports custom configurations via the BCPOptions class, including file paths, query hints, and column definitions.

Package Initialization:

  • __init__.py updates: Added imports for BCPOptions, ColumnFormat, and BCPClient to make them accessible at the package level.

@github-actions github-actions bot added the pr-size: large Substantial code update label Jul 2, 2025
@github-actions github-actions bot added pr-size: medium Moderate update size and removed pr-size: large Substantial code update labels Jul 4, 2025
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.

1 participant