Igor Dal Bo
02/17/2026, 7:57 AMkapa.ai
02/17/2026, 7:57 AMkapa.ai
02/17/2026, 7:57 AMkapa.ai
02/17/2026, 10:12 PMkapa.ai
02/17/2026, 10:13 PMtext Compilation Error in operation elementary-on-run-start-0 (./dbt_project.yml) 'None' has no attribute 'database' This happens when dbt evaluates Elementary’s `on-run-start`/`on-run-end` operations and tries to access .database on something that ended up being None instead of a proper relation/config object. [[Issue 1628](https://github.com/elementary-data/elementary/issues/1628)] ### Common configuration causes (from the sources) From the related threads and similar “database missing / NoneType” errors, the typical culprits are: 1. Custom generate_database_name macro that requires a database for every model If you override generate_database_name and your implementation assumes every model has an explicit +database configured, then Elementary’s models/operations will fail unless you also configure a database for them. The fix shown in the Slack thread is to add something like this to `dbt_project.yml`: yaml models: elementary: +database: "YOUR_DATABASE" +schema: "elementary_data_observability" # or your preferred schema This ensures Elementary models have a valid database and don’t resolve to None. [[Snowflake thread](https://elementary-community.slack.com/archives/C02CTC89LAX/p1697727293913119)] 2. Missing / misconfigured database in project config A related error pattern is: > Missing database, please check that the environment variables are properly set and the database is set in dbt_project.yml under model, seeds, test, etc. This was fixed by explicitly configuring the database (and often schema) for the elementary models block, same as above. [[Snowflake thread](https://elementary-community.slack.com/archives/C02CTC89LAX/p1697727293913119)] 3. Profiles / targets not aligned with where Elementary models live Several “database/schema missing / failed to parse Elementary’s database and schema” errors were ultimately caused by: - elementary profile pointing at the wrong database/schema, or - no valid target set for the elementary profile, so dbt/edr fell back to a non‑existent or misconfigured target. [[Profiles & targets](https://elementary-community.slack.com/archives/C02CTC89LAX/p1680035534817339); [Wrong env](https://elementary-community.slack.com/archives/C02CTC89LAX/p1693995794537679)] While those examples don’t show the exact 'None' has no attribute 'database' string, they’re the same class of issue: dbt can’t resolve a proper database for Elementary’s models/operations. ### What you can try Based on the above patterns: 1. If you override generate_database_name Add explicit config for Elementary in `dbt_project.yml`: yaml models: elementary: +database: "YOUR_DATABASE" +schema: "YOUR_ELEMENTARY_SCHEMA" 2. Check your profiles.yml for the elementary profile - Ensure it has a valid database and schema. - Ensure it has a target (or default target) defined. - Make sure that database/schema actually exist and match where dbt run --select elementary created the tables. [[Profiles guidance](https://elementary-community.slack.com/archives/C02CTC89LAX/p1680035534817339)] 3. Re‑run Elementary models after fixing config bash dbt run --select elementary If you share your dbt_project.yml (especially any models: elementary: block) and whether you override generate_database_name, you can map your case more precisely to the documented patterns above. The sources do not provide a single explicit fix for this exact error string, only these closely related configuration issues.