Querying the dbt Semantic Layer (JDBC, GraphQL, BI)

One model, many surfaces — JDBC, GraphQL, MetricFlow CLI, and BI integrations.

0/2 done

Overview

The same semantic model, four front doors

Once semantic_models/*.yml and metrics/*.yml exist, the dbt Semantic Layer exposes them through four surfaces:

  1. MetricFlow CLImf query --metrics revenue --group-by metric_time__week,country. Used in CI, notebooks, ad-hoc.
  2. GraphQL — programmatic, typed; the canonical way for embedded apps and LLM agents.
  3. JDBCjdbc:arrow-flight-sql://... lets Tableau, Hex, Mode and Power BI ask SELECT {{metric('revenue')}} BY {{dimension('country')}} like any database.
  4. dbt Cloud Semantic Layer integrations — Looker, Hex, Mode etc. consume the GraphQL endpoint natively.

All four share the same compiler (MetricFlow), so the answer is identical regardless of front door. That property is the entire point: a Tableau executive dashboard, a Streamlit ops tool, and a Slack-bot LLM all see the same revenue because they're calling the same compiler.

Analogy — one ledger, four channels

Four front doors onto one compiler is a bank you can reach by branch counter, ATM, phone line and mobile app. You check your balance through whichever channel is nearest, but every channel reads the same core banking ledger — so the number is identical no matter how you asked. dbt SL's JDBC, GraphQL, CLI and native integrations are those four channels; MetricFlow is the single ledger behind them all. The day two channels disagree about your balance is the day you stop trusting the bank — which is precisely why the semantic layer routes every front door through one compiler instead of letting each compute its own answer.

Reflect

Most teams adopt the dbt SL by exposing JDBC to one BI tool first. The pivotal moment is the second consumer — the embedded app or LLM that hits GraphQL. That's when the layer stops being 'a Tableau backend' and starts being a real semantic interface.

  • Which is the first BI tool you'd point at the dbt SL JDBC endpoint — and what's the test that proves the numbers match the existing dashboard?
  • Which is the first non-BI consumer (LLM, embedded app, reverse ETL) you'd add — and which metrics does it need on day one?

Reading in progress · 0 of 2 activities done