Load a dbt project as Dagster software-defined assets using @dbt_assets and DbtCliResource

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

Steps

  1. Define a DbtProject pointing at the dbt project directory (and manifest/state paths) to make dbt models available to Dagster.
  2. Decorate a function with @dbt_assets referencing the compiled manifest.json, and have the function accept an AssetExecutionContext and a DbtCliResource parameter.
  3. Inside the function, invoke a dbt command via the resource's cli() method and yield from the resulting event stream so Dagster translates each dbt node's success/failure into asset materialization events.
  4. Register DbtCliResource in the Definitions object's resources dictionary, pointing project_dir at the dbt project so runs execute the correct dbt invocation.
  5. Customize asset keys/groups by subclassing DagsterDbtTranslator and overriding methods like get_asset_key or get_group_name if the default dbt-model-to-asset mapping doesn't match your naming conventions.

Known gotchas

Related routes

Materialize Dagster software-defined assets and observe materialization metadata via the GraphQL API
docs.dagster.io · 5 steps · unrated
Configure Dagster+ branch deployments with automated CI checks for asset graph validation
docs.dagster.io · 5 steps · unrated
Configure Dagster+ branch deployments with automated asset graph validation in CI on pull requests
docs.dagster.io · 6 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