dbt-project-evaluator icon indicating copy to clipboard operation
dbt-project-evaluator copied to clipboard

Issue with custom schemas for dev targets

Open adrpino opened this issue 1 year ago • 1 comments

Hi folks, adding this as an empty issue as I believe it's not a bug, but a feature :smile:

We've got our DBT deployment configured so that each developer has their own dev target, i.e. dbt_{user_name}.{dataset_name}__{table_name}, e.g. dbt_adrian.dbt_project_evaluator__dbt_project_evaluator_exceptions.

We're trying to configure dbt-project-evaluator so that everybody can check model violations / exceptions in their own dev environments.

For this we've configured our dbt_project_evaluator_exceptions.csv seed file, being reflected in our dbt_project.yml file:

seeds:
  dbt_project_evaluator:
    dbt_project_evaluator_exceptions:
      +enabled: false
  company:
    dbt_project_evaluator:
      +schema: dbt_project_evaluator
...
  dbt_project_evaluator:
    +schema: dbt_project_evaluator
    staging:
      +schema: stg_dbt_project_evaluator

When I build via

dbt build --select package:dbt_project_evaluator dbt_project_evaluator_exceptions

All models are created correctly, being prefixed by either dbt_project_evaluator__ or stg_dbt_project_evaluator__.

However, it seems that, for instance, checking the exception seeds, it's not following the full path, ie. dbt_adrian.dbt_project_evaluator__dbt_project_evaluator_exceptions, instead it's looking for dbt_adrian.dbt_project_evaluator_exceptions.

Do you have an idea of what am I doing wrong?

Thanks!

adrpino avatar Oct 25 '22 16:10 adrpino

Hi Adrián!

Are you saying that

  1. the package fails because it tries to read the seed with the wrong name, or
  2. that the package works but you would like the seed to be called dbt_project_evaluator__dbt_project_evaluator_exceptions?

In addition, could you please tell me:

  1. what is the name of your project? (I assume it is company)
  2. which directory/subdirectories the seed file has been created in?

b-per avatar Oct 26 '22 09:10 b-per