Skip to content

Add semantic-layer REST API exposing cubes as views#2318

Merged
robinld merged 2 commits into
DataJunction:mainfrom
robinld:robind/semantic-layer-api
Jul 9, 2026
Merged

Add semantic-layer REST API exposing cubes as views#2318
robinld merged 2 commits into
DataJunction:mainfrom
robinld:robind/semantic-layer-api

Conversation

@robinld

@robinld robinld commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Implements part of the spec from https://github.com/betodealmeida/sl-db-engine-spec/blob/5f41b523975b2547ba73fb606a0b69615fc6967e/server/SPEC.md

Expose /semantic/* so external clients can browse cubes as views and get physical SQL to execute. SQL generation reuses DJ's canonical metrics-SQL path via a shared generate_metrics_sql helper; dialect resolution is now pin-aware so a pinned cube's dialect matches the cube it builds from.

Expose /semantic/* so external clients can browse cubes as views and get
physical SQL to execute. SQL generation reuses DJ's canonical metrics-SQL path
via a shared generate_metrics_sql helper; dialect resolution is pin-aware so a
pinned cube's dialect matches the cube it builds from.
@netlify

netlify Bot commented Jul 8, 2026

Copy link
Copy Markdown

Deploy Preview for thriving-cassata-78ae72 ready!

Name Link
🔨 Latest commit ba1bb3b
🔍 Latest deploy log https://app.netlify.com/projects/thriving-cassata-78ae72/deploys/6a4ff15adfa85300084b83a0
😎 Deploy Preview https://deploy-preview-2318--thriving-cassata-78ae72.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@shangyian shangyian left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM! 🚢 Only left some minor comments

Comment thread datajunction-server/datajunction_server/api/sql.py Outdated
Comment thread datajunction-server/datajunction_server/api/semantic_layer.py
@robinld robinld marked this pull request as ready for review July 9, 2026 01:00
The cube_filters merge moved into the shared generate_metrics_sql
helper, but the [SQL] log statement stayed in get_metrics_sql_v3.

Move the timer/counter/log into generate_metrics_sql so the logged
values are the as-built ones.
@robinld robinld requested a review from shangyian July 9, 2026 19:07
@robinld robinld merged commit 9db6379 into DataJunction:main Jul 9, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants