René's URL Explorer Experiment


Title: Add client-side batching for CreateMultiple/UpdateMultiple/UpsertMultiple · Issue #156 · microsoft/PowerPlatform-DataverseClient-Python · GitHub

Open Graph Title: Add client-side batching for CreateMultiple/UpdateMultiple/UpsertMultiple · Issue #156 · microsoft/PowerPlatform-DataverseClient-Python

X Title: Add client-side batching for CreateMultiple/UpdateMultiple/UpsertMultiple · Issue #156 · microsoft/PowerPlatform-DataverseClient-Python

Description: Problem CreateMultiple, UpdateMultiple, and UpsertMultiple each send all records in a single POST regardless of count. There is no client-side chunking. _create_multiple (data/_odata.py:316-376) — builds one {"Targets": [...]} payload wi...

Open Graph Description: Problem CreateMultiple, UpdateMultiple, and UpsertMultiple each send all records in a single POST regardless of count. There is no client-side chunking. _create_multiple (data/_odata.py:316-376) — ...

X Description: Problem CreateMultiple, UpdateMultiple, and UpsertMultiple each send all records in a single POST regardless of count. There is no client-side chunking. _create_multiple (data/_odata.py:316-376) — ...

Opengraph URL: https://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues/156

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add client-side batching for CreateMultiple/UpdateMultiple/UpsertMultiple","articleBody":"## Problem\n\n`CreateMultiple`, `UpdateMultiple`, and `UpsertMultiple` each send **all records in a single POST** regardless of count. There is no client-side chunking.\n\n- `_create_multiple` (data/_odata.py:316-376) — builds one `{\"Targets\": [...]}` payload with every record and POSTs it.\n- `_update_multiple` (data/_odata.py:656-697) — same pattern.\n- `_upsert_multiple` (data/_odata.py:440-493) — same pattern.\n\nDataverse has a server-side limit (typically 1,000 records per `*Multiple` call). Sending more can result in 400/413 errors or timeouts. Today, callers must chunk manually in their scripts. The SDK should handle this internally.\n\n## Proposed changes\n\n### 1. Client-side batching (correctness fix)\n\nSplit large record lists into 1,000-record chunks and send each as a separate POST. This is the minimum viable fix.\n\n```python\n# Pseudocode for _create_multiple with batching\nBATCH_SIZE = 1000\n\ndef _create_multiple(self, entity_set, table_schema_name, records):\n    all_ids = []\n    for i in range(0, len(records), BATCH_SIZE):\n        chunk = records[i:i + BATCH_SIZE]\n        ids = self._create_multiple_batch(entity_set, table_schema_name, chunk)\n        all_ids.extend(ids)\n    return all_ids\n```\n\n**Atomicity trade-off:** Today a single POST is atomic (all-or-nothing). Splitting into batches means partial success is possible — batch 1 succeeds, batch 2 fails, leaving the caller with a partial import. This should be clearly documented. Callers who need atomicity should limit their input to \u003c=1000 records.\n\n### 2. Optional concurrent batch dispatch (performance, follow-on)\n\nAfter batching exists, add an opt-in `max_workers` parameter to dispatch batches concurrently via `concurrent.futures.ThreadPoolExecutor` (stdlib, no new dependency).\n\n```python\ndef create(self, table, data, *, max_workers=1):\n    # max_workers=1 (default) = sequential, identical to today\n    # max_workers=4 = 4 concurrent batch POSTs\n```\n\n**Default must be 1** (sequential) to avoid any regression:\n- No extra threads on slow machines\n- No extra memory overhead\n- No concurrent request spike hitting Dataverse rate limits\n- Identical behavior to today unless user explicitly opts in\n\nWhen `max_workers \u003e 1`:\n- Uses ThreadPoolExecutor (~8MB stack per thread, bounded by `max_workers`)\n- Respects 429 (rate limit) responses — backs off all workers\n- Connection pooling via existing `_HttpClient` session support\n\n### 3. Page pre-fetching in `_get_multiple` (separate enhancement)\n\n`_get_multiple` (data/_odata.py:821-826) fetches pages sequentially in a `while next_link` loop. Each page blocks until complete before the next is requested.\n\nPre-fetching 1 page ahead while the caller processes the current page would overlap I/O with processing:\n\n```python\ndef _get_multiple(self, ..., prefetch_pages=0):\n    # prefetch_pages=0 (default) = sequential, identical to today\n    # prefetch_pages=1 = fetch next page while caller processes current\n```\n\n**Default must be 0** to avoid buffering extra pages in memory. A single pre-fetched page for a 5,000-record default page size is ~5-20MB depending on column count — acceptable when opted in, but shouldn't be forced.\n\n### 4. Picklist cache warming (separate enhancement)\n\n`_optionset_map` (data/_odata.py:1219-1331) makes 2 HTTP calls per string field on cache miss. The cache works well for subsequent records, but the first record with N string fields triggers 2N sequential HTTP calls.\n\nA `warm_picklist_cache(table)` method that fetches all picklist metadata for a table in a single request would eliminate the cold-start penalty for bulk operations.\n\n## APIs NOT proposed for parallelism\n\n| API | Why not |\n|---|---|\n| Chunked file upload (`_upload.py:117-195`) | Protocol is sequential by design — uses session token with `Content-Range` headers, each chunk returns 206 before next can be sent |\n| Column creation (`_odata.py:1712-1762`) | Dataverse metadata locks on the same table can cause conflicts with concurrent POSTs |\n| Column deletion (`_odata.py:1764-1831`) | Same metadata lock concern |\n| Relationship creation (`_relationships.py`) | Same metadata lock concern |\n| BulkDelete (`_odata.py:548-618`) | Already async server-side; splitting into concurrent jobs adds complexity with minimal benefit |\n\n## Context\n\nIdentified during end-to-end validation of a 21-table dataset import. The agent-generated script had to implement its own chunking (`chunk_size=1000`) because the SDK doesn't handle it. Client-side batching should be an SDK responsibility, not something every caller reinvents.","author":{"url":"https://github.com/suyask-msft","@type":"Person","name":"suyask-msft"},"datePublished":"2026-04-05T21:18:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/156/PowerPlatform-DataverseClient-Python/issues/156"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:67b1eea6-0909-f8fb-2bc9-dde463d6f1ab
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC1D4:299DE6:4F2D9F:6C664B:6A4D3DEA
html-safe-noncec8f47e569f93e3d7078f709cecf5facf36d113f4f945777ac55514be3c656926
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMUQ0OjI5OURFNjo0RjJEOUY6NkM2NjRCOjZBNEQzREVBIiwidmlzaXRvcl9pZCI6IjEwMzE5NTM0NjQ3MzU2NDUxNjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac7f3ecfcec6127d7f08d1f44bb1fe001feea5c0147df569672e95341c4b2999d9
hovercard-subject-tagissue:4208599198
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/PowerPlatform-DataverseClient-Python/156/issue_layout
twitter:imagehttps://opengraph.githubassets.com/15633b935d9175d5e35e68e5ee0878436eb2a5f6bec5492a9adcc4211b2f795b/microsoft/PowerPlatform-DataverseClient-Python/issues/156
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/15633b935d9175d5e35e68e5ee0878436eb2a5f6bec5492a9adcc4211b2f795b/microsoft/PowerPlatform-DataverseClient-Python/issues/156
og:image:altProblem CreateMultiple, UpdateMultiple, and UpsertMultiple each send all records in a single POST regardless of count. There is no client-side chunking. _create_multiple (data/_odata.py:316-376) — ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamesuyask-msft
hostnamegithub.com
expected-hostnamegithub.com
None92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6
turbo-cache-controlno-preview
go-importgithub.com/microsoft/PowerPlatform-DataverseClient-Python git https://github.com/microsoft/PowerPlatform-DataverseClient-Python.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id1042273116
octolytics-dimension-repository_nwomicrosoft/PowerPlatform-DataverseClient-Python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1042273116
octolytics-dimension-repository_network_root_nwomicrosoft/PowerPlatform-DataverseClient-Python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release56fc8347865a14e2ec811533d68f929cf4e0ec19
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues/156#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FPowerPlatform-DataverseClient-Python%2Fissues%2F156
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FPowerPlatform-DataverseClient-Python%2Fissues%2F156
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FPowerPlatform-DataverseClient-Python
Reloadhttps://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues/156
Reloadhttps://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues/156
Reloadhttps://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues/156
Please reload this pagehttps://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues/156
microsoft https://github.com/microsoft
PowerPlatform-DataverseClient-Pythonhttps://github.com/microsoft/PowerPlatform-DataverseClient-Python
Notifications https://github.com/login?return_to=%2Fmicrosoft%2FPowerPlatform-DataverseClient-Python
Fork 22 https://github.com/login?return_to=%2Fmicrosoft%2FPowerPlatform-DataverseClient-Python
Star 56 https://github.com/login?return_to=%2Fmicrosoft%2FPowerPlatform-DataverseClient-Python
Code https://github.com/microsoft/PowerPlatform-DataverseClient-Python
Issues 6 https://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues
Pull requests 14 https://github.com/microsoft/PowerPlatform-DataverseClient-Python/pulls
Actions https://github.com/microsoft/PowerPlatform-DataverseClient-Python/actions
Projects https://github.com/microsoft/PowerPlatform-DataverseClient-Python/projects
Models https://github.com/microsoft/PowerPlatform-DataverseClient-Python/models
Security and quality 0 https://github.com/microsoft/PowerPlatform-DataverseClient-Python/security
Insights https://github.com/microsoft/PowerPlatform-DataverseClient-Python/pulse
Code https://github.com/microsoft/PowerPlatform-DataverseClient-Python
Issues https://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues
Pull requests https://github.com/microsoft/PowerPlatform-DataverseClient-Python/pulls
Actions https://github.com/microsoft/PowerPlatform-DataverseClient-Python/actions
Projects https://github.com/microsoft/PowerPlatform-DataverseClient-Python/projects
Models https://github.com/microsoft/PowerPlatform-DataverseClient-Python/models
Security and quality https://github.com/microsoft/PowerPlatform-DataverseClient-Python/security
Insights https://github.com/microsoft/PowerPlatform-DataverseClient-Python/pulse
Add client-side batching for CreateMultiple/UpdateMultiple/UpsertMultiplehttps://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues/156#top
https://github.com/abelmilash-msft
enhancementNew feature or requesthttps://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/suyask-msft
suyask-msfthttps://github.com/suyask-msft
on Apr 5, 2026https://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues/156#issue-4208599198
abelmilash-msfthttps://github.com/abelmilash-msft
enhancementNew feature or requesthttps://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.