I'm in a strange situation here, so maybe this is ...
# community-support
b
I'm in a strange situation here, so maybe this is all just on me, but getting non-deterministic results from
edr report
, and can't figure out what's going wrong. I have three dbt projects:
base
,
integration
,
customer
. Via their
packages.yml
,
customer
depends on
integration
and
integration
depends on
base
. I have models whose sql files live in
integration
, but their properties-yaml files (with
data_tests
) live in
base
. So like this:
Copy code
base
  models
    marts
      _marts_models.yml       <--- mart tests here
integration
  packages.yml                <--- imports base project
  models
    marts
      mart_a.sql
      mart_b.sql
      mart_c.sql
    staging
      _staging_models.yml
      stg_model_a.sql
      stg_model_b.sql
customer
  packages.yml               <--- imports integration project
Running
dbt test
does the right thing, all 1000 tests are run. But when I run
edr report
, the output always includes the tests defined in
integration
but only sometimes includes the tests defined in
base
. I can't figure out why elementary can't reliably record the results of the tests in the
base
project.
Ah! I have a new finding that might help if anyone happens to look at this. The tests that are missing from my
edr report
output are stored in the
elementary.dbt_test
with the wrong schema name....
dbt_test__audit
. I still have no idea why though...
If anyone else finds this post and wants a way forward: every solution we found involved keeping the
_models.yml
file in the same project as the SQL definitions. The best approach we settled on was to make special
mart_a_qa
models in the base package that do a simple
select * from ref('mart_a')
and then write the tests on those qa models