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
@@ -36,7 +36,8 @@ A Python client library for Microsoft Dataverse that provides a unified interfac
36
36
37
37
-**🔄 CRUD Operations**: Create, read, update, and delete records with support for bulk operations and automatic retry
38
38
-**⚡ True Bulk Operations**: Automatically uses Dataverse's native `CreateMultiple`, `UpdateMultiple`, `UpsertMultiple`, and `BulkDelete` Web API operations for maximum performance and transactional integrity
39
-
-**📊 SQL Queries**: Execute read-only SQL queries via the Dataverse Web API `?sql=` parameter
39
+
-**🔍 Fluent QueryBuilder**: Type-safe query construction with method chaining, composable filter expressions, and automatic OData generation
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
42
43
-**📎 File Operations**: Upload files to Dataverse file columns with automatic chunking for large files
@@ -113,7 +114,7 @@ The SDK provides a simple, pythonic interface for Dataverse operations:
113
114
| Concept | Description |
114
115
|---------|-------------|
115
116
|**DataverseClient**| Main entry point; provides `records`, `query`, `tables`, and `files` namespaces |
116
-
|**Namespaces**| Operations are organized into `client.records` (CRUD & OData queries), `client.query` (query & search), `client.tables` (metadata), and `client.files` (file uploads) |
117
+
|**Namespaces**| Operations are organized into `client.records` (CRUD), `client.query` (QueryBuilder & SQL), `client.tables` (metadata), and `client.files` (file uploads) |
117
118
|**Records**| Dataverse records represented as Python dictionaries with column schema names |
118
119
|**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)|
119
120
|**Bulk Operations**| Efficient bulk processing for multiple records with automatic optimization |
The **QueryBuilder** is the recommended way to query records. It provides a fluent, type-safe interface that generates correct OData queries automatically — no need to remember OData filter syntax.
237
+
238
+
```python
239
+
# Fluent query builder (recommended)
240
+
for page in (client.query.builder("account")
241
+
.select("name", "revenue")
242
+
.filter_eq("statecode", 0)
243
+
.filter_gt("revenue", 1000000)
244
+
.order_by("revenue", descending=True)
245
+
.top(100)
246
+
.page_size(50)
247
+
.execute()):
248
+
for record in page:
249
+
print(f"{record['name']}: {record['revenue']}")
250
+
```
251
+
252
+
The QueryBuilder handles value formatting, column name casing, and OData syntax automatically. All filter methods are discoverable via IDE autocomplete:
0 commit comments