dbt · Arazzo Workflow

dbt Cloud Run Completion to Semantic Layer Metrics

Version 1.0.0

Confirm a run succeeded, then query the Semantic Layer API for available metrics.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub Analytics EngineeringDataELTMetricsProjectSQLTransformationArazzoWorkflows

Provider

dbt

Workflows

run-to-semantic-metrics
After a successful run, query the Semantic Layer for its environment's metrics.
Reads the run; if status is 10 (success) it runs a Semantic Layer GraphQL query bound to the run's environment id to list available metrics.
2 steps inputs: accountId, runId, token outputs: environmentId, metrics, runStatus
1
getRun
Read the run and confirm it succeeded. Status 10 means the build completed and the Semantic Layer reflects the latest metric definitions.
2
queryMetrics
Query the Semantic Layer API for the metrics defined in the run's environment, binding the environmentId variable to the run's environment.

Source API Descriptions

Arazzo Workflow Specification

Raw ↑
arazzo: 1.0.1
info:
  title: dbt Cloud Run Completion to Semantic Layer Metrics
  summary: Confirm a run succeeded, then query the Semantic Layer API for available metrics.
  description: >-
    Bridges the Administrative API and the Semantic Layer API. The workflow
    reads a run and confirms it reached the terminal success status (status code
    10), then issues a GraphQL query to the Semantic Layer API for the run's
    environment to list the metrics MetricFlow now exposes. This is the standard
    pattern for refreshing a downstream BI metric catalog after a successful
    build. Every step spells out its request inline so the flow can be read and
    executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: metricsApi
  url: ../openapi/dbt-metrics-api-openapi.yml
  type: openapi
- name: runsApi
  url: ../openapi/dbt-runs-api-openapi.yml
  type: openapi
workflows:
- workflowId: run-to-semantic-metrics
  summary: After a successful run, query the Semantic Layer for its environment's metrics.
  description: >-
    Reads the run; if status is 10 (success) it runs a Semantic Layer GraphQL
    query bound to the run's environment id to list available metrics.
  inputs:
    type: object
    required:
    - accountId
    - runId
    - token
    properties:
      accountId:
        type: integer
        description: The dbt Cloud account id.
      runId:
        type: integer
        description: The id of the run to confirm before querying metrics.
      token:
        type: string
        description: The dbt Cloud service token (sent as Authorization Bearer Token).
  steps:
  - stepId: getRun
    description: >-
      Read the run and confirm it succeeded. Status 10 means the build
      completed and the Semantic Layer reflects the latest metric definitions.
    operationId: getRun
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.token
    - name: accountId
      in: path
      value: $inputs.accountId
    - name: runId
      in: path
      value: $inputs.runId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      status: $response.body#/data/status
      environmentId: $response.body#/data/environment_id
    onSuccess:
    - name: succeeded
      type: goto
      stepId: queryMetrics
      criteria:
      - context: $response.body
        condition: $.data.status == 10
        type: jsonpath
    - name: notSucceeded
      type: end
      criteria:
      - context: $response.body
        condition: $.data.status != 10
        type: jsonpath
  - stepId: queryMetrics
    description: >-
      Query the Semantic Layer API for the metrics defined in the run's
      environment, binding the environmentId variable to the run's environment.
    operationId: executeSemanticQuery
    parameters:
    - name: Authorization
      in: header
      value: Bearer $inputs.token
    requestBody:
      contentType: application/json
      payload:
        query: >-
          query Metrics($environmentId: BigInt!) {
            metrics(environmentId: $environmentId) { name description type }
          }
        variables:
          environmentId: $steps.getRun.outputs.environmentId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      metrics: $response.body#/data/metrics
  outputs:
    runStatus: $steps.getRun.outputs.status
    environmentId: $steps.getRun.outputs.environmentId
    metrics: $steps.queryMetrics.outputs.metrics

Work with this as data

Every workflow here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for arazzo workflows

4 MCP tools reach this
  • find_arazzoBrowse and filter every workflow in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This workflow
curl "https://apis.io/api/v1/arazzo/dbt-run-to-semantic-metrics-workflow"
All arazzo workflows
curl "https://apis.io/api/v1/arazzo?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.