Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile error in redshift when configuring exceptions to the rules #384

Closed
GavinChowUp opened this issue Sep 27, 2023 · 4 comments
Closed

Comments

@GavinChowUp
Copy link

Hi team, I fllowed the doc to configuring exceptions, my dbt_project_evaluator_exceptions.csv is:

fct_name,column_name,id_to_exclude,comment
fct_root_models,common_dim_date,common_%, Models called common_ can empty root models.

Also I have disabled the dbt_project_evaluator_exceptions:

image

when I use the command:

dbt build --select package:dbt_project_evaluator dbt_project_evaluator_exceptions

I got error:

03:23:20  Running with dbt=1.6.1
03:23:20  Registered adapter: redshift=1.6.1
03:23:20  Unable to do partial parsing because saved manifest not found. Starting full parse.

### List of issues raised by dbt_project_evaluator ###


03:23:23  [WARNING]: Found patch for macro "redefine_ref_and_source" which was not found
03:23:24  Encountered an error:
Compilation Error
  Model 'model.dbt_project_evaluator.fct_undocumented_models' (models/marts/documentation/fct_undocumented_models.sql) depends on a node named 'dbt_project_evaluator_exceptions' in package or project 'dbt_project_evaluator' which is disabled

How can I avoid this?

@b-per
Copy link
Collaborator

b-per commented Sep 27, 2023

That's odd. Could you please share the content of redefine_ref_and_source?

I am wondering if there is a logic in there that is triggering this behaviour.

@GavinChowUp
Copy link
Author

@b-per Thanks for replying, redefine_ref_and_source is used by dbt-unit-testing, not sure this affects the evaluator. since this warning alse exists when I execute other commands, here is the content:

{% macro ref() %}
   {{ return(dbt_unit_testing.ref(*varargs, **kwargs)) }}
{% endmacro %}

{% macro source() %}
   {{ return(dbt_unit_testing.source(*varargs, **kwargs)) }}
{% endmacro %}

@b-per
Copy link
Collaborator

b-per commented Sep 27, 2023

Hi @GavinChowUp , I was able to replicate the issue locally. This seems to be a bug with dbt-unit-testing and the update of the ref() command.

I'd recommend raising this in their repo.

I'll close this one as there is nothing we can do on this side but feel free to link this issue in the other repo so we can track it if you find a solution.

@graciegoheen
Copy link
Collaborator

Hey @GavinChowUp - we're currently working on building unit testing as native functionality in dbt-core. I'd be curious to get your thoughts over on this discussion dbt-labs/dbt-core#8275

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants