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
@@ -13,6 +15,8 @@ A minimal Python SDK to use Microsoft Dataverse as a database for Azure AI Found
13
15
- Simple `DataverseClient` facade for CRUD, SQL (read-only), and table metadata.
14
16
- SQL-over-API: T-SQL routed through Custom API endpoint (no ODBC / TDS driver required).
15
17
- Table metadata ops: create simple custom tables with primitive columns (string/int/decimal/float/datetime/bool) and delete them.
18
+
- Bulk create via `CreateMultiple` (collection-bound) by passing `list[dict]` to `create(entity_set, payloads)`; returns list of created IDs.
19
+
- Retrieve multiple with server-driven paging: `get_multiple(...)` yields lists (pages) following `@odata.nextLink`. Control total via `$top` and per-page via `page_size` (Prefer: `odata.maxpagesize`).
16
20
- Optional pandas integration (`PandasODataClient`) for DataFrame based create / get / query.
17
21
18
22
Auth:
@@ -62,6 +66,8 @@ python examples/quickstart.py
62
66
The quickstart demonstrates:
63
67
- Creating a simple custom table (metadata APIs)
64
68
- Creating, reading, updating, and deleting records (OData)
69
+
- Bulk create (CreateMultiple) to insert many records in one call
70
+
- Retrieve multiple with paging (contrasting `$top` vs `page_size`)
rows = client.query_sql("SELECT TOP 3 accountid, name FROM account ORDER BY createdon DESC")
102
108
for r in rows:
103
109
print(r.get("accountid"), r.get("name"))
110
+
111
+
## Bulk create (CreateMultiple)
112
+
113
+
Pass a list of payloads to `create(entity_set, payloads)` to invoke the collection-bound `Microsoft.Dynamics.CRM.CreateMultiple` action. The method returns a `list[str]` of created record IDs.
114
+
115
+
```python
116
+
# Bulk create accounts (returns list of GUIDs)
117
+
payloads = [
118
+
{"name": "Contoso"},
119
+
{"name": "Fabrikam"},
120
+
{"name": "Northwind"},
121
+
]
122
+
ids = client.create("accounts", payloads)
123
+
assertisinstance(ids, list) andall(isinstance(x, str) for x in ids)
124
+
print({"created_ids": ids})
125
+
```
126
+
127
+
Notes:
128
+
- The bulk create response typically includes IDs only; the SDK returns the list of GUID strings.
129
+
- Single-record `create` still returns the full entity representation.
130
+
131
+
## Retrieve multiple with paging
132
+
133
+
Use `get_multiple(entity_set, ...)` to stream results page-by-page. You can cap total results with `$top` and hint the per-page size with `page_size` (sets Prefer: `odata.maxpagesize`).
134
+
135
+
```python
136
+
# Iterate pages of accounts ordered by name, selecting a few columns
0 commit comments