Olli Kortelahti
04/28/2025, 8:16 AMkapa.ai
04/28/2025, 8:16 AMkapa.ai
04/28/2025, 8:17 AMdbt_project.yml file that conditionally enables the Elementary package based on the target name. This is a common approach when you want to run Elementary in production environments but disable it in development environments to speed up local development. Here's how to do it: yaml models: elementary: +schema: "elementary" +enabled: "{{ target.name in ['prod', 'analytics'] }}" In this example, Elementary will only be enabled when your target name is either 'prod' or 'analytics'. You should replace these target names with the ones you actually use in your environment. This approach is recommended by Elementary's team and has been confirmed to work in multiple [Slack forum discussions](https://slack.com/archives/C02CTC89LAX/p1678208106811249). Alternatively, you can use a variable-based approach as shared by some community members: yaml models: elementary: +schema: "elementary" +enabled: "{{ var('enable_elementary', target.name in ['prod', 'analytics']) }}" With this configuration, Elementary will be enabled by default for the specified targets, but you can override it using the --vars flag in your dbt command: dbt run --vars '{"enable_elementary": false}' This gives you more flexibility to enable or disable Elementary on a per-run basis, regardless of the target you're using.