Repository navigation
Fix get_direct_lake_sources failure when SQL endpoint source is referenced by name instead of GUID - #1336
Open
Michael Kovalsky (m-kovalsky) with Copilot wants to merge 6 commits into
Open
Fix get_direct_lake_sources failure when SQL endpoint source is referenced by name instead of GUID#1336Michael Kovalsky (m-kovalsky) with Copilot wants to merge 6 commits into
get_direct_lake_sources failure when SQL endpoint source is referenced by name instead of GUID#1336Michael Kovalsky (m-kovalsky) with Copilot wants to merge 6 commits into
Conversation
Copilot started work on behalf of
Michael Kovalsky (m-kovalsky)
September 16, 2026 16:13
View session
Co-authored-by: m-kovalsky <29556918+m-kovalsky@users.noreply.github.com>
Co-authored-by: m-kovalsky <29556918+m-kovalsky@users.noreply.github.com>
Co-authored-by: m-kovalsky <29556918+m-kovalsky@users.noreply.github.com>
Co-authored-by: m-kovalsky <29556918+m-kovalsky@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix Vertipaq Analyzer error for Lakehouse SQL Analytics endpoint
Fix Sep 16, 2026
get_direct_lake_sources failure when SQL endpoint source is referenced by name instead of GUID
Michael Kovalsky (m-kovalsky)
marked this pull request as ready for review
September 18, 2026 06:54
Copilot started reviewing on behalf of
Michael Kovalsky (m-kovalsky)
September 18, 2026 06:54
View session
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Consumers must handle missing source descriptors or preserve an explicit failure.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Fixes Direct Lake source resolution when SQL expressions use lakehouse or warehouse names instead of GUIDs.
Changes:
- Detects GUID identifiers.
- Resolves friendly names by exact workspace-item matches.
- Caches workspace items per call.
- Warns and skips unresolved or ambiguous matches.
File summaries
| File | Summary |
|---|---|
src/sempy_labs/tom/_model.py |
Adds name-based source resolution and caching; unresolved sources may cause incomplete results and downstream StopIteration failures. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| f"'{name}' expression {reason} in the '{self._workspace_name}' " | ||
| "workspace and will be skipped." | ||
| ) | ||
| continue |
Contributor
Author
There was a problem hiding this comment.
Fixed in d3a0949: instead of skipping and returning a partial sources list, we now raise a ValueError when a Direct Lake expression's referenced item can't be resolved to exactly one Lakehouse/Warehouse, so callers like vertipaq_analyzer() never end up with a missing descriptor.
Copilot started work on behalf of
Michael Kovalsky (m-kovalsky)
September 24, 2026 11:13
View session
Co-authored-by: m-kovalsky <29556918+m-kovalsky@users.noreply.github.com>
Michael Kovalsky (m-kovalsky)
approved these changes
Oct 4, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vertipaq_analyzer()andget_direct_lake_sources()raised aFabricHTTPException(400) when a Direct Lake model's SQL Analytics Endpoint source expression referenced the lakehouse/warehouse by its friendly display name (e.g.LH_Admin) rather than its GUID. The code passed this name straight through tometadata/artifacts/{artifact_id}, which only accepts GUIDs.Changes
Sql.DatabaseM expression with_is_valid_uuidbefore calling the artifacts API.get_direct_lake_sources()call and reused across all unresolved expressions to avoid redundant API calls.