Query dbt Semantic Layer metric history using the GraphQL queryRecords endpoint

domain: docs.getdbt.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Obtain your Semantic Layer GraphQL endpoint URL, which follows the pattern https://semantic-layer.YOUR_HOST.getdbt.com/api/graphql for single-tenant deployments
  2. Authenticate by including a service token or personal access token in the Authorization header as Bearer YOUR_TOKEN
  3. Send a POST request with a GraphQL query body calling queryRecords, specifying filters such as date range, status, and metric names to narrow the history
  4. Parse the returned fields including query status, timing, SQL dialect, and the metrics and group-by dimensions used in each historical query
  5. Use the paginated metadata query endpoints (available as of 2025) to handle large manifests without hitting response size limits

Known gotchas

Related routes

Query the dbt Cloud Semantic Layer GraphQL API to retrieve metric values with dimension breakdowns
docs.getdbt.com · 5 steps · unrated
Query legacy Datadog timeseries metric data with the Metrics API v1 query endpoint
docs.datadoghq.com · 5 steps · unrated
Write Loki LogQL queries using log pipeline stages and metric queries to extract and aggregate structured fields from logs
grafana.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans