Adonis HARROUK
07/02/2025, 10:37 AMkapa.ai
07/02/2025, 10:37 AMkapa.ai
07/02/2025, 10:38 AM> models: > elementary: > +schema: elementary > > > [Elementary in production](https://docs.elementary-data.com/oss/deployment-and-configuration/elementary-in-production) So, you can use "elementary" as your schema name, as long as it is consistent across your dbt and Elementary CLI configurations. The suffix is a best practice, not a requirement. If your prod dashboard is empty, focus on ensuring that both dbt and edr are using the same schema/dataset, and that your dbt tests are actually populating the Elementary tables in that location.Adonis HARROUK
07/02/2025, 4:00 PMdbt test --store-failures -t composer-prod &&
dbt run -s elementary --profiles-dir . --profile elementary -t elementary-prod &&
edr send-report --env prod --profiles-dir . -t elementary-prod --gcs-bucket-name *** --bucket-file-path *** --update-bucket-website true -d 30 -ch *** -st *** &&
edr monitor --env prod --profiles-dir . -t elementary-prod -ch *** -st ***
I've hidden some sensible information with *. So i'm wondering if i've been using elementary badly, because i'm running dbt run-s elementary each time after a dbt test. But do i really need it or can i move directly to the edr cmds ?kapa.ai
07/02/2025, 4:01 PMkapa.ai
07/02/2025, 4:01 PMdbt run -s elementary every time after dbt test. According to multiple sources, the recommended practice is: - Run dbt run -s elementary only on initial setup or when upgrading the Elementary package to a new minor version (i.e., when there are schema changes). This command creates or updates the necessary Elementary tables and views. - For regular operation, the on-run-end hooks and the Elementary CLI (edr monitor, edr send-report, etc.) handle the collection and reporting of test results. You can skip the dbt run -s elementary step in your daily/regular pipeline runs unless you are specifically updating the schema or have made changes to the Elementary package itself. Here are some relevant references: - "`dbt run --select elementary` is only needed to build the tables on installation or a minor version update. The on-run-end hooks populate these tables" [Slack answer](https://slack.com/archives/C02CTC89LAX/p1741272625948369). - "You need to run dbt run -s elementary on 2 occasions: 1. When you first install elementary dbt package on an env... 2. When you upgrade to a new Elementary minor version..." [Slack answer](https://slack.com/archives/C02CTC89LAX/p1685412868454149). - "There is no need to run dbt run -s elementary after first setup, except for versions updates, for all models to align" [Slack answer](https://slack.com/archives/C02CTC89LAX/p1711543686145199). In summary: You can safely remove the dbt run -s elementary step from your regular Airflow job. Just run it on initial setup or after upgrading the Elementary package. For daily runs, running dbt test followed by your edr commands is sufficient.Adonis HARROUK
07/03/2025, 8:34 AMkapa.ai
07/03/2025, 8:35 AMkapa.ai
07/03/2025, 8:35 AMrun_results.json file generated by dbt. Elementary uses dbt's on-run-end hooks to write results (such as test results, run results, etc.) into dedicated tables in your warehouse (e.g., elementary_test_results, dbt_run_results, etc.). The Elementary CLI (edr) then reads from these tables to generate the dashboard and reports. The run_results.json file is not used directly by the dashboard; instead, its contents are loaded into the warehouse tables by the dbt package hooks and models. Here’s a relevant explanation: > all of the source data for the report is located in your elementary schema. Documentation on all of the models there can be found [here](https://github.com/elementary-data/dbt-data-reliability/blob/master/models/dbt_artifacts.yml). > Regarding the "Monitored tables" specifically, it is generated using a union between dbt_models and dbt_sources to find all the tables, then joining with dbt_tests to see which tables have monitors configured for them. > [Slack answer](https://slack.com/archives/C02CTC89LAX/p1707205953561139) And: > elementary_test_results - data about all test results (dbt, elementary, other packages) that Elementary needs for generating the UI. Data is loaded at on-run-end after tests are executed. (incremental) > dbt_run_results - data from the dbt results object, loaded at an on-run-end after each invocation that generates results. So you would get results for models, tests, snapshots, etc. (incremental) > [Slack answer](https://slack.com/archives/C02CTC89LAX/p1662059505282089) So, the dashboard does not read from run_results.json directly, but from the warehouse tables populated by the dbt package. If your dashboard is empty, the issue is likely with data not being written to or read from the correct tables in your warehouse, not with the presence or absence of the run_results.json file.