René's URL Explorer Experiment


Title: client.query.sql() silently truncates at 5,000 rows — should auto-paginate · Issue #157 · microsoft/PowerPlatform-DataverseClient-Python · GitHub

Open Graph Title: client.query.sql() silently truncates at 5,000 rows — should auto-paginate · Issue #157 · microsoft/PowerPlatform-DataverseClient-Python

X Title: client.query.sql() silently truncates at 5,000 rows — should auto-paginate · Issue #157 · microsoft/PowerPlatform-DataverseClient-Python

Description: Problem client.query.sql() sends a single GET /{entity_set}?sql= and returns whatever the server responds with. The Dataverse Web API default page size is 5,000 rows. If the query matches more than 5,000 rows, results are silently...

Open Graph Description: Problem client.query.sql() sends a single GET /{entity_set}?sql= and returns whatever the server responds with. The Dataverse Web API default page size is 5,000 rows. If the query matches mo...

X Description: Problem client.query.sql() sends a single GET /{entity_set}?sql=<query> and returns whatever the server responds with. The Dataverse Web API default page size is 5,000 rows. If the query matc...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"client.query.sql() silently truncates at 5,000 rows — should auto-paginate","articleBody":"## Problem\n\n`client.query.sql()` sends a single `GET /{entity_set}?sql=\u003cquery\u003e` and returns whatever the server responds with. The Dataverse Web API default page size is 5,000 rows. If the query matches more than 5,000 rows, **results are silently truncated** — no error, no warning.\n\nThis is inconsistent with the rest of the SDK:\n- `client.records.get()` — auto-paginates via `@odata.nextLink`, returns all results\n- `client.dataframe.get()` — auto-paginates, consolidates into a single DataFrame\n\n`client.query.sql()` is the only read method that silently drops data.\n\n## Observed behavior\n\n```python\n# Table has 136,590 rows\nresults = client.query.sql(\"SELECT srcid FROM prefix_ballbyball\")\nlen(results)  # → 5000 (silently truncated, no error)\n```\n\nThe user gets 5,000 rows and has no way to know 131,590 rows are missing.\n\n## Expected behavior\n\n`client.query.sql()` should follow `@odata.nextLink` in the response and return all matching rows, consistent with `records.get()` and `dataframe.get()`.\n\n## Proposed fix\n\nCheck for `@odata.nextLink` in the response from `_query_sql()` and continue fetching pages until exhausted:\n\n```python\ndef _query_sql(self, sql: str) -\u003e list[dict[str, Any]]:\n    # ... existing validation ...\n    url = f\"{self.api}/{entity_set}\"\n    params = {\"sql\": sql}\n    all_rows = []\n    \n    r = self._request(\"get\", url, params=params)\n    body = r.json() if r.text else {}\n    all_rows.extend(body.get(\"value\", []))\n    \n    next_link = body.get(\"@odata.nextLink\")\n    while next_link:\n        r = self._request(\"get\", next_link)\n        body = r.json() if r.text else {}\n        all_rows.extend(body.get(\"value\", []))\n        next_link = body.get(\"@odata.nextLink\")\n    \n    return all_rows\n```\n\nAlternatively, return a page iterator consistent with `records.get()` — but this would change the return type from `list[Record]` to `Iterable[list[Record]]`.\n\n## Impact\n\nAny user querying a table with \u003e5,000 rows via `client.query.sql()` is getting silently truncated results today. The `?sql=` parameter is commonly used for filtered reads and its utility would increase significantly if it could return full result sets.\n\n## Context\n\nDiscovered during end-to-end testing of a 21-table cricket dataset import (297K total records). After import, analytical queries via `client.query.sql()` returned only 5,000 of 136,590 rows from the largest table, producing incorrect aggregation results.","author":{"url":"https://github.com/suyask-msft","@type":"Person","name":"suyask-msft"},"datePublished":"2026-04-06T03:32:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/157/PowerPlatform-DataverseClient-Python/issues/157"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:94feaa30-f961-250b-304c-a993187d5b57
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB20A:298211:1B85B:25127:6A4D4FA6
html-safe-nonce051e2eade239d6ce8eaeb0271184e9cfdf087409bfac1d27b11569dbb1ec827a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjBBOjI5ODIxMToxQjg1QjoyNTEyNzo2QTRENEZBNiIsInZpc2l0b3JfaWQiOiIyMzE4ODQ3MzM4NzQ1Nzc4MDg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaca86b37337ac8817df181ab2e74a6a8aa78eedd7ada80d8b97f97130a11d674a0
hovercard-subject-tagissue:4209369428
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/157/issue_layout
twitter:imagehttps://opengraph.githubassets.com/1b9c0b22476f3b912618b515ff676cd6659a890e7a9c57633dbef6b2cf47901d/microsoft/PowerPlatform-DataverseClient-Python/issues/157
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/1b9c0b22476f3b912618b515ff676cd6659a890e7a9c57633dbef6b2cf47901d/microsoft/PowerPlatform-DataverseClient-Python/issues/157
og:image:altProblem client.query.sql() sends a single GET /{entity_set}?sql= and returns whatever the server responds with. The Dataverse Web API default page size is 5,000 rows. If the query matches mo...
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/157#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FPowerPlatform-DataverseClient-Python%2Fissues%2F157
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%2F157
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/157
Reloadhttps://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues/157
Reloadhttps://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues/157
Please reload this pagehttps://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues/157
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
client.query.sql() silently truncates at 5,000 rows — should auto-paginatehttps://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues/157#top
https://github.com/sagebree
bugSomething isn't workinghttps://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues?q=state%3Aopen%20label%3A%22bug%22
https://github.com/suyask-msft
suyask-msfthttps://github.com/suyask-msft
on Apr 6, 2026https://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues/157#issue-4209369428
sagebreehttps://github.com/sagebree
bugSomething isn't workinghttps://github.com/microsoft/PowerPlatform-DataverseClient-Python/issues?q=state%3Aopen%20label%3A%22bug%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.