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
When running dbt compile on version 0.17, dbt executes a create schema if not exists statement if custom schemas are defined. This is a unexpected change as previous versions of dbt did not try to create a schema during dbt compile.
Steps To Reproduce
Install dbt 0.17
Setup a dbt project that defines custom schemas in dbt_project.yml using version 1 syntax (not sure if it makes a difference).
Run dbt compile and check Snowflake query history or debug output to see that it tries to create a schema.
Expected behavior
dbt compile should not try to modify the database when running.
Screenshots and log output
Snippet from the dbt --debug output:
2020-06-09 22:27:41.474162 (MainThread): Acquiring new snowflake connection "master".
2020-06-09 22:27:41.474252 (MainThread): Opening a new connection, currently in state init
2020-06-09 22:27:41.482698 (ThreadPoolExecutor-0_0): Acquiring new snowflake connection "list_analytics".
2020-06-09 22:27:41.482933 (ThreadPoolExecutor-0_0): Opening a new connection, currently in state init
2020-06-09 22:27:41.492030 (ThreadPoolExecutor-0_0): Using snowflake connection "list_analytics".
2020-06-09 22:27:41.492177 (ThreadPoolExecutor-0_0): On list_analytics: /* {"app": "dbt", "dbt_version": "0.17.0", "profile_name": "jaffle_shop", "target_name": "dev", "connection_name": "list_analytics"} */
show terse schemas in database analytics
limit 10000
2020-06-09 22:27:43.145722 (ThreadPoolExecutor-0_0): SQL status: SUCCESS 171 in 1.65 seconds
2020-06-09 22:27:43.157762 (ThreadPoolExecutor-0_0): Acquiring new snowflake connection "create_analytics_dev_scronin_compile_test".
2020-06-09 22:27:43.157916 (ThreadPoolExecutor-0_0): Re-using an available connection from the pool (formerly list_analytics).
2020-06-09 22:27:43.158104 (ThreadPoolExecutor-0_0): Creating schema "analytics.dev_scronin_compile_test"
2020-06-09 22:27:43.163265 (ThreadPoolExecutor-0_0): Using snowflake connection "create_analytics_dev_scronin_compile_test".
2020-06-09 22:27:43.163414 (ThreadPoolExecutor-0_0): On create_analytics_dev_scronin_compile_test: BEGIN
2020-06-09 22:27:43.339854 (ThreadPoolExecutor-0_0): SQL status: SUCCESS 1 in 0.18 seconds
2020-06-09 22:27:43.340158 (ThreadPoolExecutor-0_0): Using snowflake connection "create_analytics_dev_scronin_compile_test".
2020-06-09 22:27:43.340351 (ThreadPoolExecutor-0_0): On create_analytics_dev_scronin_compile_test: /* {"app": "dbt", "dbt_version": "0.17.0", "profile_name": "jaffle_shop", "target_name": "dev", "connection_name": "create_analytics_dev_scronin_compile_test"} */
create schema if not exists analytics.dev_scronin_compile_test
2020-06-09 22:27:43.958637 (ThreadPoolExecutor-0_0): SQL status: SUCCESS 1 in 0.62 seconds
2020-06-09 22:27:43.960449 (ThreadPoolExecutor-0_0): On create_analytics_dev_scronin_compile_test: COMMIT
2020-06-09 22:27:43.960655 (ThreadPoolExecutor-0_0): Using snowflake connection "create_analytics_dev_scronin_compile_test".
2020-06-09 22:27:43.960765 (ThreadPoolExecutor-0_0): On create_analytics_dev_scronin_compile_test: COMMIT
2020-06-09 22:27:44.145170 (ThreadPoolExecutor-0_0): SQL status: SUCCESS 1 in 0.18 seconds
Describe the bug
When running
dbt compile
on version 0.17, dbt executes acreate schema if not exists
statement if custom schemas are defined. This is a unexpected change as previous versions of dbt did not try to create a schema duringdbt compile
.Steps To Reproduce
dbt_project.yml
using version 1 syntax (not sure if it makes a difference).dbt compile
and check Snowflake query history or debug output to see that it tries to create a schema.Expected behavior
dbt compile
should not try to modify the database when running.Screenshots and log output
Snippet from the
dbt --debug
output:System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
Ubuntu 16.04
The output of
python --version
:Python 3.8.2
Additional context
Original dbt Slack thread
The text was updated successfully, but these errors were encountered: