Open
Conversation
added 2 commits
November 10, 2025 09:54
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request refactors the Dataverse SDK's delete operations to better handle bulk deletes and introduces asynchronous bulk delete capabilities. The key changes differentiate between elastic and standard tables, optimize delete operations accordingly, and provide users with more control over delete performance.
Key Changes
- Introduced
delete_asyncmethod for asynchronous bulk deletes using BulkDelete API - Modified
deletemethod to automatically useDeleteMultiplefor elastic tables and sequential deletes for standard tables - Added
_is_elastic_tablehelper method with caching to determine table type
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/dataverse_sdk/client.py | Added delete_async method and updated delete to automatically choose between DeleteMultiple (elastic) and sequential deletes (standard) |
| src/dataverse_sdk/odata.py | Implemented _is_elastic_table with caching, refactored _delete_multiple to use DeleteMultiple action, and _delete_async signature changes |
| README.md | Updated documentation to describe new delete_async method and clarify delete behavior for elastic vs standard tables |
| examples/quickstart.py | Updated to use delete_async for bulk deletes and improved cleanup logic for elastic tables |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…microsoft/PowerPlatform-DataverseClient-Python into users/zhaodongwang/deleteUpdate
…averseClient-Python into users/zhaodongwang/deleteUpdate
…averseClient-Python into users/zhaodongwang/deleteUpdate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated delete with a new delete_async method and use DeleteMultiple for delete when it's an elastic table
Copilot summary:
This pull request updates the Dataverse SDK to improve how bulk deletes are handled and introduces a new asynchronous bulk delete method. The changes clarify the behavior of the
deletemethod, add a newdelete_asyncmethod for better performance when deleting multiple records, and update documentation and examples to reflect these improvements.Bulk Delete API Improvements
deletemethod inclient.pyso that it always returnsNoneand performs sequential deletes for standard tables, while usingDeleteMultiplefor elastic tables. The bulk delete job ID is no longer returned from this method. [1] [2]delete_asyncmethod toclient.pythat issues an asynchronous BulkDelete job for one or more records and returns the BulkDelete job identifier. This is recommended for better performance when deleting many records._is_elastic_tableinodata.pyto determine if a table is elastic, and refactored_delete_multipleand_delete_asyncto support the new delete logic. [1] [2] [3]Documentation Updates
README.mdto clarify the behavior ofdeleteand document the newdelete_asyncmethod, including return types and usage recommendations. [1] [2] [3] [4] [5]Example Code Updates
examples/quickstart.pyto demonstrate the use ofdelete_asyncfor bulk deletes and updated logging to match the new API.quickstart.pyto handle elastic table deletion more robustly.