<@U088WCP3B4P> My edr report is generating blank. ...
# ask-elementary-ai
v
@kapa.ai My edr report is generating blank. I see the elementary test results are empty. Also elementary tests are not logging in this table. It is generating seperately with test_294abcdef_elementary_freshness_anomalies_stg_insert_ts like that. What is the way to fix this problem
k
A message from kapa.ai
The issue you're describing—where your edr report is blank, the elementary_test_results table is empty, and test results are being logged in separate tables like test_294abcdef_elementary_freshness_anomalies_stg_insert_ts—typically points to a problem with how dbt tests and the Elementary package are configured or executed. Here are the key points and steps to resolve this: 1. Elementary Test Results Table Is Empty If elementary_test_results is empty, it usually means that the dbt tests are not being executed in a way that Elementary can capture their results. The separate tables (like test_294abcdef_elementary_freshness_anomalies_stg_insert_ts) are temporary tables created during test execution, but the results need to be merged into elementary_test_results by Elementary's on-run-end hooks. 2. Check Test Execution Sequence You must run the following sequence for Elementary to capture test results: -
dbt run --select elementary
-
dbt test
-
edr report
Make sure you run
dbt test
after running the Elementary models. If you run
dbt test
before, the results won't be captured in elementary_test_results. This is a common cause of empty reports and missing test results in the main table [Blank report and empty test results](https://slack.com/archives/C02CTC89LAX/p1660748994945629). 3. Consistent Targets and Profiles Ensure that you are using the same dbt target for both
dbt run --select elementary
and
dbt test
. If you use different targets, the test results may not be written to the expected schema, leading to empty reports [Target mismatch issue](https://slack.com/archives/C02CTC89LAX/p1683764076675589). 4. Elementary Profile Configuration The Elementary CLI (edr) requires a profile named elementary in your profiles.yml, and it must point to the schema where elementary_test_results is located. If this is misconfigured, the CLI won't find the results table, even if it exists [Profile configuration details](https://slack.com/archives/C02CTC89LAX/p1659002103951729). 5. On-Run-End Hook The on-run-end hook in your dbt_project.yml should include
{{ elementary.on_run_end() }}
. This hook is responsible for merging the test results from the temporary tables into elementary_test_results. If this is missing or not executed, the main results table will remain empty [Hook explanation](https://slack.com/archives/C02CTC89LAX/p1660057402603589). Summary of steps to fix: - Ensure your dbt_project.yml has the correct on-run-end hook. - Run
dbt run --select elementary
and then
dbt test
on the same target. - Confirm that your profiles.yml has an elementary profile pointing to the correct schema. - After running the above, check if elementary_test_results is now populated, then run
edr report
. If you follow these steps and the issue persists, check the logs (edr.log and dbt.log) for errors, as they can provide more specific information about what might be failing in your setup. Let me know if you need help checking your configuration files or logs!