I'm getting empty reports from project. I have not...
# ask-elementary-ai
n
I'm getting empty reports from project. I have noticed that if I comment out most of my data tests, I get a proper report, but as soon as I add in some more accepted_range or other tests (with no clear pattern I can notice), reports turn back empty. I see there are tests in the elementary_test_results table as well as content in dbt_models and dbt_tests, and I can't see any error in the logs. What may be happening?
k
A message from kapa.ai
Based on the knowledge sources, there are a few possible reasons for the behavior you're experiencing with empty reports when adding more data tests, even though you see test results in elementary_test_results and content in dbt_models and dbt_tests: 1. Volume or Complexity of Tests Causing Failures or Timeouts There are cases where running a large number of tests or certain types of tests can cause the on-run-end hooks (which Elementary uses to collect and upload test results) to fail or time out. If the hook fails, the results may not be fully written to the Elementary tables, even if some data appears present. This can especially happen if you have a large number of models or tests, or if another on-run-end hook fails before Elementary's hook runs, preventing it from executing at all. This was observed in a case where a user's custom on-run-end hook failure prevented Elementary from collecting results, and only a subset of models/tests worked when selected, but not the full set. The user also noted that the volume of data might be a factor, especially with large projects [see discussion here](https://slack.com/archives/C02CTC89LAX/p1722936228529189). 2. Profile or Target Mismatch If the Elementary CLI is not pointed at the correct profile or target, it may not be reading from the correct schema/database, even if the tables exist and are populated. Double-check that your profiles.yml is correctly configured and that the CLI is using the right target/schema where your test results are written. This is a common cause of empty reports even when data exists in the warehouse [see example](https://slack.com/archives/C02CTC89LAX/p1657704479221769). 3. Permissions or Role Issues Sometimes, changes in roles or permissions can cause the CLI to be unable to read from the correct tables, resulting in empty reports. This can be subtle, especially if some data is visible but not all, depending on the permissions of the user running the CLI [see example](https://slack.com/archives/C02CTC89LAX/p1681390353973209). 4. dbt Version or Materialization Issues If you are using dbt 1.8 or above, there is a known issue where the new materialization behavior can prevent Elementary from collecting test result rows. You may need to add the following to your dbt_project.yml:
Copy code
yaml    flags:      require_explicit_package_overrides_for_builtin_materializations: false
This allows Elementary to override dbt's default materializations and collect test results as expected [see details](https://slack.com/archives/C02CTC89LAX/p1736200862741069). 5. Resource Limits or Query Failures If you have a very large number of tests, you may be hitting resource or timeout limits in your data warehouse, causing some queries to fail silently. Check your data warehouse's query history for failed queries after running dbt test, as this can sometimes reveal issues not visible in the CLI logs [see troubleshooting flow](https://slack.com/archives/C02CTC89LAX/p1660057402603589). Recommended next steps: - Check your dbt_project.yml for the materialization flag if using dbt 1.8+. - Review your on-run-end hooks for failures, especially if you have custom hooks. - Try running a smaller subset of tests and gradually increase to identify if a specific test or volume triggers the issue. - Double-check your profiles.yml and CLI target/schema configuration. - Review your data warehouse's query history for failed queries. - If possible, share your edr.log and dbt.log with Elementary support for deeper troubleshooting. If after these steps the issue persists, please provide more details about your dbt version, Elementary package/CLI versions, and any custom dbt hooks you may be using.