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
Merge origin/main into batch branch: bring in files namespace and model reorganization
- Keep both client.files and client.batch namespaces
- Accept origin/main's _list_entities with filter/select parameters
- Fix imports: models.metadata was reorganized into relationship.py + labels.py
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.
114
+
> **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.
115
+
```python
116
+
from PowerPlatform.Dataverse.models.upsert import UpsertItem
echo "::warning file=.azdo/ci-pr.yaml::This PR changes .azdo/ci-pr.yaml. After merge, Azure DevOps may disable/require approval for the PR pipeline YAML until it is re-enabled/approved."
- All flat methods on `DataverseClient` (`create`, `update`, `delete`, `get`, `query_sql`, `upload_file`, etc.) now emit `DeprecationWarning` and delegate to the corresponding namespaced operations
20
+
21
+
## [0.1.0b3] - 2025-12-19
22
+
23
+
### Added
24
+
- Client-side correlation ID and client request ID for request tracing (#70)
25
+
- Unit tests for `DataverseClient` (#71)
26
+
27
+
### Changed
28
+
- Standardized package versioning (#84)
29
+
- Updated package link (#69)
30
+
31
+
### Fixed
32
+
- Retry logic for examples (#72)
33
+
- Removed double space formatting issue (#82)
34
+
- Updated CI trigger to include main branch (#81)
35
+
36
+
## [0.1.0b2] - 2025-11-17
37
+
38
+
### Added
39
+
- Enforce Black formatting across the codebase (#61, #62)
40
+
- Python 3.14 support added to `pyproject.toml` (#55)
41
+
42
+
### Changed
43
+
- Removed `pandas` dependency (#57)
44
+
- Refactored SDK architecture and quality improvements (#55)
45
+
- Prefixed table names with schema name for consistency (#51)
46
+
- Updated docstrings across core modules (#54, #63)
47
+
48
+
### Fixed
49
+
- Fixed `get` for single-select option set columns (#52)
50
+
- Fixed example filename references and documentation URLs (#60)
51
+
- Fixed API documentation link in examples (#64)
52
+
- Fixed CI pipeline to use modern `pyproject.toml` dev dependencies (#56, #59)
53
+
8
54
## [0.1.0b1] - 2025-11-14
9
55
10
56
### Added
@@ -19,6 +65,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
19
65
- Comprehensive error handling with specific exception types (`DataverseError`, `AuthenticationError`, etc.) (#22, #24)
20
66
- HTTP retry logic with exponential backoff for resilient operations (#72)
@@ -35,7 +36,7 @@ A Python client library for Microsoft Dataverse that provides a unified interfac
35
36
## Key features
36
37
37
38
-**🔄 CRUD Operations**: Create, read, update, and delete records with support for bulk operations and automatic retry
38
-
-**⚡ True Bulk Operations**: Automatically uses Dataverse's native `CreateMultiple`, `UpdateMultiple`, and `BulkDelete` Web API operations for maximum performance and transactional integrity
39
+
-**⚡ True Bulk Operations**: Automatically uses Dataverse's native `CreateMultiple`, `UpdateMultiple`, `UpsertMultiple`, and `BulkDelete` Web API operations for maximum performance and transactional integrity
39
40
-**📊 SQL Queries**: Execute read-only SQL queries via the Dataverse Web API `?sql=` parameter
40
41
-**🏗️ Table Management**: Create, inspect, and delete custom tables and columns programmatically
41
42
-**🔗 Relationship Management**: Create one-to-many and many-to-many relationships between tables with full metadata control
@@ -113,8 +114,8 @@ The SDK provides a simple, pythonic interface for Dataverse operations:
113
114
114
115
| Concept | Description |
115
116
|---------|-------------|
116
-
|**DataverseClient**| Main entry point; provides `records`, `query`, `tables`, and `batch` namespaces |
117
-
|**Namespaces**| Operations are organized into `client.records` (CRUD & OData queries), `client.query` (query & search), `client.tables` (metadata), and `client.batch` (batch requests) |
117
+
|**DataverseClient**| Main entry point; provides `records`, `query`, `tables`, `files`, and `batch` namespaces |
118
+
|**Namespaces**| Operations are organized into `client.records` (CRUD & OData queries), `client.query` (query & search), `client.tables` (metadata), `client.files` (file uploads), and `client.batch` (batch requests) |
118
119
|**Records**| Dataverse records represented as Python dictionaries with column schema names |
119
120
|**Schema names**| Use table schema names (`"account"`, `"new_MyTestTable"`) and column schema names (`"name"`, `"new_MyTestColumn"`). See: [Table definitions in Microsoft Dataverse](https://learn.microsoft.com/en-us/power-apps/developer/data-platform/entity-metadata)|
120
121
|**Bulk Operations**| Efficient bulk processing for multiple records with automatic optimization |
Create relationships between tables using the relationship API. For a complete working example, see [examples/advanced/relationships.py](https://github.com/microsoft/PowerPlatform-DataverseClient-Python/blob/main/examples/advanced/relationships.py).
268
320
269
321
```python
270
-
from PowerPlatform.Dataverse.models.metadataimport (
322
+
from PowerPlatform.Dataverse.models.relationshipimport (
271
323
LookupAttributeMetadata,
272
324
OneToManyRelationshipMetadata,
273
325
ManyToManyRelationshipMetadata,
274
-
Label,
275
-
LocalizedLabel,
276
326
)
327
+
from PowerPlatform.Dataverse.models.labels import Label, LocalizedLabel
277
328
278
329
# Create a one-to-many relationship: Department (1) -> Employee (N)
279
330
# This adds a "Department" lookup field to the Employee table
@@ -328,11 +379,11 @@ result = client.tables.create_lookup_field(
328
379
329
380
```python
330
381
# Upload a file to a record
331
-
client.upload_file(
332
-
table_schema_name="account",
333
-
record_id=account_id,
334
-
file_name_attribute="new_Document", # If the file column doesn't exist, it will be created automatically
335
-
path="/path/to/document.pdf"
382
+
client.files.upload(
383
+
"account",
384
+
account_id,
385
+
"new_Document", # If the file column doesn't exist, it will be created automatically
0 commit comments