You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: upsert and upsertmultiple functionality with alternate key support (#106)
* feat: implement upsert and upsertmultiple functionality with alternate key support
* enhance upsert validation and add unit tests for alternate key handling
* fix format with black
* fix: apply black formatting to records.py
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: add upsert usage to README and SKILL.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: add upsert section to README and SKILL.md with prerequisite note
Documents client.records.upsert() usage including single, bulk, composite
key, and plain dict (no-import) examples. Adds prerequisite note that an
alternate key must be configured in Dataverse before upsert will work.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Samson Gebre <sagebree@microsoft.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Creates or updates records identified by alternate keys. Single item → PATCH; multiple items → `UpsertMultiple` bulk action.
112
+
> **Prerequisite**: The table must have an alternate key configured in Dataverse for the columns used in `alternate_key`. Without it, Dataverse will reject the request with a 400 error.
113
+
```python
114
+
from PowerPlatform.Dataverse.models.upsert import UpsertItem
@@ -34,7 +35,7 @@ A Python client library for Microsoft Dataverse that provides a unified interfac
34
35
## Key features
35
36
36
37
-**🔄 CRUD Operations**: Create, read, update, and delete records with support for bulk operations and automatic retry
37
-
-**⚡ True Bulk Operations**: Automatically uses Dataverse's native `CreateMultiple`, `UpdateMultiple`, and `BulkDelete` Web API operations for maximum performance and transactional integrity
38
+
-**⚡ True Bulk Operations**: Automatically uses Dataverse's native `CreateMultiple`, `UpdateMultiple`, `UpsertMultiple`, and `BulkDelete` Web API operations for maximum performance and transactional integrity
38
39
-**📊 SQL Queries**: Execute read-only SQL queries via the Dataverse Web API `?sql=` parameter
39
40
-**🏗️ Table Management**: Create, inspect, and delete custom tables and columns programmatically
40
41
-**🔗 Relationship Management**: Create one-to-many and many-to-many relationships between tables with full metadata control
Creates or updates records identified by alternate keys. Single item → PATCH; multiple items → `UpsertMultiple` bulk action.
112
+
> **Prerequisite**: The table must have an alternate key configured in Dataverse for the columns used in `alternate_key`. Without it, Dataverse will reject the request with a 400 error.
113
+
```python
114
+
from PowerPlatform.Dataverse.models.upsert import UpsertItem
0 commit comments