-
Notifications
You must be signed in to change notification settings - Fork 125
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
Add config blocks for the "source" models #391
base: main
Are you sure you want to change the base?
Conversation
Hi @jsnb-devoted thanks for opening this PR. I just wanted to clarify my understanding on this. In your |
Hi @jared-rimmer -- This was my project config:
Then I made the default materialization for my project
And my understanding is that overrode the "source" models materialization in the I assumed that the project config in |
bump - @jared-rimmer any thoughts on this? |
Anyone? Maybe @jaypeedevlin since it looks like you implemented the original feature? Happy to close this if this was just user error or if it isn't any interest. |
The current documentation has this around configurations, maybe it addresses your query.
On a side note, with 2.6.1, I get an error on
|
This is a good call out @hash0b. I did not see this note in the README -- had I read this I probably wouldn't have lost all that data. I don't feel that strongly about it but it seems like there isn't any benefit to letting someone override the materialization for these particular "source" style models. You can prevent that from happening by hardcoding the materialization like I did in the PR. It's no longer an issue for me anymore so it is really up to you all maintainers @jared-rimmer @jaypeedevlin |
Hi all, just to add here that I no longer work for Brooklyn Data so am not actively involved in maintaining this package. |
Overview
Adds config blocks to the upstream "source" models according to the dbt project file.
Update type - breaking / non-breaking
What does this solve?
I've been working on standardizing model configs in my project and I set the default materialization to table in the
dbt_project.yml
. It appears to have overridden the materialization for these "source" models such that the subsequent runs had been doing aCREATE OR REPLACE
and wiping out all of the data without my knowing. At least that is what I think happened. I copied the project config settings from the repo to include thesource
block like so:and I confirmed that my dbt runs now look like:
instead of what they used to look like:
Outstanding questions
Is this actually the expected behavior of the dbt_project configs? I would have thought that because the materialization for the
source
block was set in the project config for this package that I wouldn't be able to override it like I did.Is there anything lost by setting these as project configs? I don't feel strongly about this change I'm just throwing it out there that this would have saved me from losing all my data.
What databases have you tested with?