-
Notifications
You must be signed in to change notification settings - Fork 944
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
Explain how default incremental_strategy
is determined for dbt-postgres and dbt-redshift
#4651
Closed
1 task done
Labels
content
Improvements or additions to content
improvement
Use this when an area of the docs needs improvement as it's currently unclear
Comments
dbeatty10
added
content
Improvements or additions to content
improvement
Use this when an area of the docs needs improvement as it's currently unclear
labels
Dec 14, 2023
This was referenced Dec 14, 2023
matthewshaver
added a commit
that referenced
this issue
Dec 14, 2023
…ift (#4652) resolves #4651 ### Previews - [dbt-postgres configs](https://docs-getdbt-com-git-dbeatty-dynamic-default-pos-c89442-dbt-labs.vercel.app/reference/resource-configs/postgres-configs#incremental-materialization-strategies) - [dbt-redshift configs](https://docs-getdbt-com-git-dbeatty-dynamic-default-pos-c89442-dbt-labs.vercel.app/reference/resource-configs/redshift-configs#incremental-materialization-strategies) ## What are you changing in this pull request and why? The default `incremental_strategy` for dbt-postgres and dbt-redshift is dynamic! It depends on [if `unique_key` is defined or not](#4633): - `delete_insert` when there is a unique_key defined and `append` otherwise All other adapters have a static default `incremental_strategy`. ## 🎩 <img width="400" alt="image" src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/ba97b2cc-76e2-41d9-a8af-e1aeebb23a2d"> ## Checklist - [x] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines.
dbeatty10
added a commit
that referenced
this issue
Dec 14, 2023
[Preview](https://docs-getdbt-com-git-dbeatty-tabular-incremental-326e95-dbt-labs.vercel.app/docs/build/incremental-models#supported-incremental-strategies-by-adapter) resolves #4634 ## What are you changing in this pull request and why? The main aim is to be able to easily answer each of these questions: - which adapters support the `delete+insert` strategy? - what are the names of the standard incremental strategies that are supported in at least one adapter? - what are the names of the standard incremental strategies that are supported most frequently? - what are the names of the standard incremental strategies that are supported least frequently? A tabular representation with one column per strategy is the easiest way to answer all of the above. ## Design decisions to be made 1. Style of the icons 1. Number of tables ### Style of the icons Any of these could work: ✅ - Green check mark ✔️ - Heavy check mark 🟢 - Green circle We probably wouldn't choose any of these: ☑️ - Ballot box with check 🆗 - OK button 👍 - Thumbs up etc. ### Number of tables We have several options: 1. Keep the status quo 1. Split into two tables: one for the available strategies, and another for the defaults 1. Keep a single table, keeping the "default strategy" column, but replacing the "additional supported strategies" with one column per strategy 1. Defer the default strategy information to each adapter-specific config page instead (see [dbt-bigquery](https://docs.getdbt.com/reference/resource-configs/bigquery-configs#merge-behavior-incremental-models) or [dbt-redshift](https://docs.getdbt.com/reference/resource-configs/redshift-configs#incremental-materialization-strategies) for examples) ### Trade-offs I strongly prefer not staying with the status quo, or I wouldn't have opened this issue 🤣 Splitting into two separate tables would solve the key problem, but at the cost of taking up more vertical space on the page. Keeping a single table but refactoring it would work for me. Completely moving the default strategy information into the adapter-specific pages might be the best of all worlds. It would solve the problem at hand while preserving documentation about the default strategy that is relevant for a particular adapter. dbt-postgres and dbt-redshift in particular have caveats related to the default -- it will change [depending if a `unique_key` is defined ](#4651 not. ## 🎩 [Preview](https://docs-getdbt-com-git-dbeatty-tabular-incremental-326e95-dbt-labs.vercel.app/docs/build/incremental-models#supported-incremental-strategies-by-adapter) ### v3 (final) <img width="550" alt="image" src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/66689bca-c733-487e-b8c3-0251da01948f"> <img width="550" alt="image" src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/2c87ce14-746c-436e-a7d9-bd4c15ffc163"> ### v2 <img width="500" alt="image" src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/2c4bb14f-4c60-4262-aec1-d10351333bb7"> ### v1 **Note:** I've since removed the 2nd table that has the defaults, but here's what it looked like with them: <img width="447" alt="image" src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/6fda6a40-2acb-44a4-b4eb-65d379020ece"> <img width="442" alt="image" src="https://github.com/dbt-labs/docs.getdbt.com/assets/44704949/a1e33dbc-f3a4-4dd8-997b-36e77269085d"> ## Checklist - [x] Review the [Content style guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md) so my content adheres to these guidelines. --------- Co-authored-by: Matt Shaver <60105315+matthewshaver@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
content
Improvements or additions to content
improvement
Use this when an area of the docs needs improvement as it's currently unclear
Contributions
Link to the page on docs.getdbt.com requiring updates
These two pages:
What part(s) of the page would you like to see updated?
The default
incremental_strategy
for dbt-postgres and dbt-redshift is dynamic!It depends on if
unique_key
is defined or not:delete_insert
when there is a unique_key defined andappend
otherwiseAll other adapters have a static default
incremental_strategy
.Additional information
No response
The text was updated successfully, but these errors were encountered: