You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to run dbt test with the +enabled config turned OFF on dbt project level and the same config is turned ON at sub-models-directory level, and got the output WARNING: Nothing to do. Try checking your model configs and model specification args
Steps To Reproduce
dbt init my_new_project : to start the fresh new dbt project, which by default will have 2 models and 4 tests under example models directory.
dbt compile: you should see 2 models and 4 tests
Changed the dbt_project.yml file to add the +enabled config on project and model level.
models:
my_new_project:
# Applies to all files under models/example/
+enabled: false
example:
+enabled: true
materialized: view
After saving the dbt_project.yml file, run dbt compile, now you will be seeing only 2 models and 0 tests
Expected behavior
As per docs, configuration on model level takes higher precedence than the config declared on project level. But, this holds true for models and it seems it is not same for tests.
dbt compile or dbt test after adding the +enabled config should have picked the 4 tests which is defined in schema.yml file under example model directory.
Screenshots and log output
System information
Which database are you using dbt with? - Snowflake
postgres
redshift
bigquery
[✔] snowflake
other (specify: ____________)
The output of dbt --version:
installed version: 0.19.2
latest version: 0.20.0
Your version of dbt is out of date! You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation
Plugins:
- bigquery: 0.19.2
- snowflake: 0.19.2
- redshift: 0.19.2
- postgres: 0.19.2
The operating system you're using:
Mac OSX
The output of python --version:
Python 3.9.6
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
@karthikeyan-sivabaskaran Thanks for opening the issue, and for including the simple reproduction case. I found the issue: These tests are winding up in the disabled dict in manifest.json. Why? In dbt v0.19.x (and older versions), tests look to the models block for their project-level configs. So even as the models they're disabling are targeted for re-enabling, the tests are still observing the blanket ban.
Here's the good news: v0.20.0 actually fixes this bug. Tests now get their own project-level configs (#3253), using a test: key, and should no longer be caught as side effects of models configs. (This is also why I wasn't able to reproduce this bug, when initially reported in Slack the other day.)
I'm going to close this issue, since it's resolved by upgrading to the latest version of dbt.
Describe the bug
I tried to run dbt test with the
+enabled
config turnedOFF
on dbt project level and the same config is turned ON at sub-models-directory level, and got the outputWARNING: Nothing to do. Try checking your model configs and model specification args
Steps To Reproduce
dbt init my_new_project
: to start the fresh new dbt project, which by default will have 2 models and 4 tests under example models directory.dbt compile
: you should see 2 models and 4 testsChanged the dbt_project.yml file to add the +enabled config on project and model level.
After saving the dbt_project.yml file, run
dbt compile
, now you will be seeing only 2 models and 0 testsExpected behavior
As per docs, configuration on model level takes higher precedence than the config declared on project level. But, this holds true for models and it seems it is not same for tests.
dbt compile
ordbt test
after adding the +enabled config should have picked the 4 tests which is defined inschema.yml
file under example model directory.Screenshots and log output
System information
Which database are you using dbt with? - Snowflake
The output of
dbt --version
:The operating system you're using:
Mac OSX
The output of
python --version
:Python 3.9.6
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: