René's URL Explorer Experiment


Title: Migrate client.sql() off deprecated v1 SQL-runner endpoints to the v2 query/sql flow · Issue #31 · lightdash/python-sdk · GitHub

Open Graph Title: Migrate client.sql() off deprecated v1 SQL-runner endpoints to the v2 query/sql flow · Issue #31 · lightdash/python-sdk

X Title: Migrate client.sql() off deprecated v1 SQL-runner endpoints to the v2 query/sql flow · Issue #31 · lightdash/python-sdk

Description: Problem client.sql() (the SQL Runner) calls Lightdash API endpoints that have been deprecated and are past their sunset date ("may be removed at any time"). If Lightdash removes them, client.sql() breaks. This is independent of query exe...

Open Graph Description: Problem client.sql() (the SQL Runner) calls Lightdash API endpoints that have been deprecated and are past their sunset date ("may be removed at any time"). If Lightdash removes them, client.sql() ...

X Description: Problem client.sql() (the SQL Runner) calls Lightdash API endpoints that have been deprecated and are past their sunset date ("may be removed at any time"). If Lightdash removes them, cli...

Opengraph URL: https://github.com/lightdash/python-sdk/issues/31

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Migrate client.sql() off deprecated v1 SQL-runner endpoints to the v2 query/sql flow","articleBody":"## Problem\n\n`client.sql()` (the SQL Runner) calls Lightdash API endpoints that have been **deprecated and are past their sunset date** (\"may be removed at any time\"). If Lightdash removes them, `client.sql()` breaks.\n\nThis is independent of query execution (`.execute()`), which already uses the current v2 async flow and is unaffected.\n\n## Deprecated endpoints in use\n\n`lightdash/sql_runner.py` currently calls:\n\n| SDK call | Lightdash status |\n|---|---|\n| `POST /api/v1/projects/{uuid}/sqlRunner/run` | `@deprecated` → `POST /api/v2/projects/{uuid}/query/sql` |\n| `GET /api/v1/projects/{uuid}/sqlRunner/results/{...}` | `@deprecated` → `GET /api/v2/projects/{uuid}/query/{queryUuid}/results` |\n| `GET /api/v1/schedulers/job/{jobId}/status` | (part of the old job-polling flow) |\n\nSource: [`packages/backend/src/controllers/sqlRunnerController.ts`](https://github.com/lightdash/lightdash/blob/main/packages/backend/src/controllers/sqlRunnerController.ts) — the `run` route is annotated `@deprecated Use POST /api/v2/projects/{projectUuid}/query/sql instead`, and the results route `@deprecated Use GET /api/v2/projects/{projectUuid}/query/{queryUuid}/results instead`. These are part of the batch deprecated **2025-02-17** with sunset **2025-05-17**.\n\nThe Lightdash **CLI has already migrated** to v2 (`packages/cli/src/handlers/sql.ts` → `/api/v2/projects/${projectUuid}/query/sql`), so the replacement path is proven.\n\n## Proposed solution\n\nMigrate `client.sql()` to the v2 async query flow:\n\n1. `POST /api/v2/projects/{uuid}/query/sql` with the SQL → returns a `queryUuid`\n2. Poll `GET /api/v2/projects/{uuid}/query/{queryUuid}` until ready, then page results\n\nThis mirrors the flow the SDK **already implements** for metric queries in `_QueryExecutor` (`query.py`) — submit → poll → paginate — so much of that logic can be reused/shared rather than written from scratch.\n\n## Open questions for the team\n\n- **Introspection endpoints:** `sqlRunner/tables` and `sqlRunner/fields` (used by `client.sql_runner.tables()/fields()`) do **not** appear to carry `@deprecated` markers. Leave them on v1, or migrate everything for consistency?\n- **Response shape:** does v2 `/query/sql` + `/query/{queryUuid}/results` return the same row/column shape `SqlResult` expects, or does the result transform need adjusting?\n- **Shared executor:** is it worth refactoring `_QueryExecutor` so both metric-query and SQL-query share the submit/poll/paginate machinery?\n- **Priority:** the sunset date has already passed — how urgent is this relative to other work?\n\n## Scope note\n\n`.execute()` / metric queries, `.compile()` (#5), explores metadata, and `/health` are all on **current, non-deprecated** endpoints — this issue is specifically the SQL Runner.\n","author":{"url":"https://github.com/jpetey75","@type":"Person","name":"jpetey75"},"datePublished":"2026-06-28T18:20:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/31/python-sdk/issues/31"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:5f4e4e9d-a603-1a5e-2a43-9de23af96656
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBC8E:384DDA:A88118:E74275:6A4D5121
html-safe-nonce9cc2876890cd6305da24c8508ed926fdcd46f8aa405a942bd1262812095eb360
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzhFOjM4NEREQTpBODgxMTg6RTc0Mjc1OjZBNEQ1MTIxIiwidmlzaXRvcl9pZCI6Ijg5MzE2OTUzMDM0MTg3OTQyNzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacca873e9f7776041d38b21607494d73a46d4d157a7f9887f1d1e12d8efbff5382
hovercard-subject-tagissue:4763183481
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/lightdash/python-sdk/31/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0b465d18f54f278f5058e3683ca2a99932aa9e8b3b0be2571365858bbdb4a349/lightdash/python-sdk/issues/31
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0b465d18f54f278f5058e3683ca2a99932aa9e8b3b0be2571365858bbdb4a349/lightdash/python-sdk/issues/31
og:image:altProblem client.sql() (the SQL Runner) calls Lightdash API endpoints that have been deprecated and are past their sunset date ("may be removed at any time"). If Lightdash removes them, client.sql() ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejpetey75
hostnamegithub.com
expected-hostnamegithub.com
None92571a8944142227b7e19cd10918b1ddd06e5066c1ad5bc7e4769cf6140a87e6
turbo-cache-controlno-preview
go-importgithub.com/lightdash/python-sdk git https://github.com/lightdash/python-sdk.git
octolytics-dimension-user_id65912827
octolytics-dimension-user_loginlightdash
octolytics-dimension-repository_id932695849
octolytics-dimension-repository_nwolightdash/python-sdk
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id932695849
octolytics-dimension-repository_network_root_nwolightdash/python-sdk
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/lightdash/python-sdk/issues/31#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flightdash%2Fpython-sdk%2Fissues%2F31
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%2Flightdash%2Fpython-sdk%2Fissues%2F31
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=lightdash%2Fpython-sdk
Reloadhttps://github.com/lightdash/python-sdk/issues/31
Reloadhttps://github.com/lightdash/python-sdk/issues/31
Reloadhttps://github.com/lightdash/python-sdk/issues/31
Please reload this pagehttps://github.com/lightdash/python-sdk/issues/31
lightdash https://github.com/lightdash
python-sdkhttps://github.com/lightdash/python-sdk
Notifications https://github.com/login?return_to=%2Flightdash%2Fpython-sdk
Fork 4 https://github.com/login?return_to=%2Flightdash%2Fpython-sdk
Star 15 https://github.com/login?return_to=%2Flightdash%2Fpython-sdk
Code https://github.com/lightdash/python-sdk
Issues 4 https://github.com/lightdash/python-sdk/issues
Pull requests 1 https://github.com/lightdash/python-sdk/pulls
Actions https://github.com/lightdash/python-sdk/actions
Projects https://github.com/lightdash/python-sdk/projects
Security and quality 0 https://github.com/lightdash/python-sdk/security
Insights https://github.com/lightdash/python-sdk/pulse
Code https://github.com/lightdash/python-sdk
Issues https://github.com/lightdash/python-sdk/issues
Pull requests https://github.com/lightdash/python-sdk/pulls
Actions https://github.com/lightdash/python-sdk/actions
Projects https://github.com/lightdash/python-sdk/projects
Security and quality https://github.com/lightdash/python-sdk/security
Insights https://github.com/lightdash/python-sdk/pulse
Migrate client.sql() off deprecated v1 SQL-runner endpoints to the v2 query/sql flowhttps://github.com/lightdash/python-sdk/issues/31#top
https://github.com/jpetey75
jpetey75https://github.com/jpetey75
on Jun 28, 2026https://github.com/lightdash/python-sdk/issues/31#issue-4763183481
packages/backend/src/controllers/sqlRunnerController.tshttps://github.com/lightdash/lightdash/blob/main/packages/backend/src/controllers/sqlRunnerController.ts
#5https://github.com/lightdash/python-sdk/issues/5
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.