I am having a strange behavior using DBT Core. I am using version 1.4.7 with the sqlserver package.
I have a custom schema specified in the dbt_project.yml file as follows:

If I edit an existing model and run 'dbt run', the edited model will be created in the default database with the default schema specified in profiles.yml instead of the database and schema provided in the dbt_project.yml file.

I do not use a custom macro for generating the custom schema name.
If I do a run providing the target the problem seems to go away 'dbt run --target dev', and a subsequent run without specifying the target works fine.
Also, editing and resaving the dbt_project.yml file before doing a 'dbt run' command seems to also work fine.
If I provide the database and schema in the {{ config }} for each model, it seems to work every run.
But forgetting to do the above, it is as if the project file is completely ignored during 'dbt run', and changed models without its own {{config}} will be created in the default target which is very annoying.
Is this a known bug or am I doing something wrong?
Turning off partial parsing did the trick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With