Skip to content

Commit eabbea4

Browse files
author
Max Wang
committed
update for merge
1 parent 3504b8a commit eabbea4

4 files changed

Lines changed: 41 additions & 691 deletions

File tree

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ A Python client library for Microsoft Dataverse that provides a unified interfac
3333
## Key features
3434

3535
- **🔄 CRUD Operations**: Create, read, update, and delete records with support for bulk operations and automatic retry
36-
- **⚡ True Bulk Operations**: Automatically uses Dataverse's native `CreateMultiple`, `UpdateMultiple`, and `BulkDelete` Web API operations for maximum performance and transactional integrity
36+
- **⚡ True Bulk Operations**: Automatically uses Dataverse's native `CreateMultiple`, `UpdateMultiple`, `DeleteMultiple` (elastic tables only), and `BulkDelete` Web API operations for maximum performance and transactional integrity
3737
- **📊 SQL Queries**: Execute read-only SQL queries via the Dataverse Web API `?sql=` parameter
3838
- **🏗️ Table Management**: Create, inspect, and delete custom tables and columns programmatically
3939
- **📎 File Operations**: Upload files to Dataverse file columns with automatic chunking for large files
@@ -162,7 +162,10 @@ ids = client.create("account", payloads)
162162
client.update("account", ids, {"industry": "Technology"})
163163

164164
# Bulk delete
165-
client.delete("account", ids, use_bulk_delete=True)
165+
client.delete("account", ids)
166+
167+
# Bulk delete async
168+
client.delete_async("account", ids)
166169
```
167170

168171
### Query data

examples/advanced/walkthrough.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,19 @@ def main():
281281
client.delete(table_name, id1)
282282
print(f"✓ Deleted single record: {id1}")
283283

284-
# Multiple delete (delete the paging demo records)
285-
log_call(f"client.delete('{table_name}', [{len(paging_ids)} IDs])")
286-
job_id = client.delete(table_name, paging_ids)
287-
print(f"✓ Bulk delete job started: {job_id}")
288-
print(f" (Deleting {len(paging_ids)} paging demo records)")
284+
# Multiple delete (demonstrate async bulk job and synchronous fallback)
285+
midpoint = len(paging_ids) // 2
286+
async_ids = paging_ids[:midpoint]
287+
sync_ids = paging_ids[midpoint:]
288+
289+
log_call(f"client.delete_async('{table_name}', [{len(async_ids)} IDs])")
290+
job_id = client.delete_async(table_name, async_ids)
291+
print(f"✓ Bulk delete job queued: {job_id}")
292+
print(f" (Deleting {len(async_ids)} paging demo records asynchronously)")
293+
294+
log_call(f"client.delete('{table_name}', [{len(sync_ids)} IDs])")
295+
client.delete(table_name, sync_ids)
296+
print(f"✓ Synchronously deleted {len(sync_ids)} paging demo records")
289297

290298
# ============================================================================
291299
# 11. CLEANUP

0 commit comments

Comments
 (0)