The Dagster equivalent is to instead use the dagster-dbt library to run commands against your dbt project. Here would be the equivalent code in Dagster:
from dagster_dbt import DbtCliResource, DbtProject, dbt_assets
from dagster import AssetExecutionContext
project = DbtProject(project_dir="path/to/dbt_project")@dbt_assets(manifest=project.manifest_path)defmy_dbt_assets(context: AssetExecutionContext, dbt: DbtCliResource):yieldfrom dbt.cli(["run"], context=context).stream()
Once your dbt project is available, you can write a function that runs your dbt commands using the dbt_assets decorator and DbtCliResource. Most dbt CLI commands and flags are supported - to learn more about using @dbt_assets, check out the dagster-dbt quickstart and reference.