dbt Models Not Appearing in Dagster UI After Scaffolding
Last updated: November 21, 2025
Problem Description
After scaffolding a dbt component in Dagster, dbt models are not visible when running dg list defs or in the Dagster UI. This occurs even when dbt configuration appears correct and dbt debug passes all checks.
Symptoms
No dbt models appear when running
dg list defsdbt models are not visible in the Dagster UI
dbt debugreturns all checks passeddbt project and profiles YAML files are correctly configured
Root Cause
The definitions.py file is not properly configured to recursively load dbt components from the project structure, preventing Dagster from discovering and registering the dbt models.
Solution
Update your definitions.py file to use recursive loading with load_from_defs_folder
Step-by-Step Resolution
First, run diagnostic commands to verify your configuration:
dg check defsEnsure your dbt manifest exists by running:
dbt deps dbt parseUpdate your definitions.py file to use recursive loading:
@definitions def defs(): return load_from_defs_folder(project_root=Path(__file__).parent.parent)Verify your defs.yaml configuration uses the correct format:
type: dagster_dbt.DbtProjectComponent attributes: project: project_dir: "{{ project_root }}/dbt" # Use forward slashes profiles_dir: "{{ project_root }}"Run
dg list defsagain to verify your dbt models are now visible
Alternative Solutions (if applicable)
If the above doesn't work, ensure your dbt project structure matches the expected layout and that all required dependencies are installed with compatible versions.
Prevention
When scaffolding dbt components, always configure the definitions.py file to use recursive loading to ensure all components are properly discovered and registered by Dagster.