No, based on the available knowledge sources, there is currently no supported way to have Elementary’s edr report command work directly with your default dbt profile and custom schema macros, without duplicating configuration in profiles.yml. Elementary’s edr CLI does not use your dbt project’s macros (like generate_schema_name) or dbt_project.yml settings when reading from the warehouse. Instead, it relies solely on the schema and database values defined in the elementary profile within profiles.yml. This means that any custom logic you use in macros to assign models to schemas is not respected by edr commands. As a result, you must explicitly define the correct schema(s) in the elementary profile, often duplicating information from your main dbt profile, to ensure edr can find the tables it needs for reporting. This is a known limitation and has been discussed in the community and GitHub issues: - “The edr commands are using only the values from your profiles.yml. The dbt macro that you override is only part of your dbt project. When running edr commands you are running a python package that uses an internal dbt project... The internal dbt project that edr is using is not aware of your dbt macro that set the schema.” [Github Issue #1462](
https://github.com/elementary-data/elementary/issues/1462) - “The schema that edr searches is configured in your profiles.yml file in the profile named elementary.” [Slack thread](
https://slack.com/archives/C02CTC89LAX/p1696270989954349) - “You can only set the custom database and schema names in the elementary profile and work as usual with your own dbt project.” [Slack thread](
https://slack.com/archives/C02CTC89LAX/p1682597578793689) The recommended workaround is to create separate targets in the elementary profile for each environment/schema you need, and invoke edr with the appropriate --profile-target. There is currently no built-in way for edr to dynamically pick up your custom schema logic from your main dbt profile or macros. If you are using a third-party tool that auto-generates profiles and you cannot control the elementary profile, this limitation can be a blocker, as noted by other users and contributors. The documentation and community have acknowledged this as an area for improvement, but as of now, explicit duplication in profiles.yml is required for edr to function correctly with custom schema setups. If you need further clarification or want to follow updates, you can track the discussion in [Github Issue #1462](
https://github.com/elementary-data/elementary/issues/1462).