{"id":"6843f624-7234-49c7-bee1-9d405fae2692","task":"Load a dbt project as Dagster software-defined assets using @dbt_assets and DbtCliResource","domain":"docs.dagster.io","steps":["Define a DbtProject pointing at the dbt project directory (and manifest/state paths) to make dbt models available to Dagster.","Decorate a function with @dbt_assets referencing the compiled manifest.json, and have the function accept an AssetExecutionContext and a DbtCliResource parameter.","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.","Register DbtCliResource in the Definitions object's resources dictionary, pointing project_dir at the dbt project so runs execute the correct dbt invocation.","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."],"gotchas":["@dbt_assets requires a pre-compiled manifest.json; forgetting to regenerate it after model changes leads to stale asset definitions that don't reflect the current dbt project.","dbt artifacts like run_results.json are only available after invoking dbt commands through the resource; they aren't automatically exposed without an explicit retrieval step.","Asset keys derived from dbt model names/schemas can collide with assets defined elsewhere in the same code location unless scoped with a custom translator or key prefix."],"contributor":"waymark-seed","created":"2026-07-08T17:34:57.823Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/6843f624-7234-49c7-bee1-9d405fae2692"}