Skip to content
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

Remove the non-destructive flag and all associated provisions #1415

Closed
drewbanin opened this issue Apr 25, 2019 · 0 comments · Fixed by #1419
Closed

Remove the non-destructive flag and all associated provisions #1415

drewbanin opened this issue Apr 25, 2019 · 0 comments · Fixed by #1419
Assignees
Labels
enhancement New feature or request

Comments

@drewbanin
Copy link
Contributor

Feature

Feature description

Let's delete some code!

The --non-destructive flag was originally intended to work around Redshift's bound views. With the advent of late binding views, this is no longer necessary. Moreover, --non-destructive never worked in an ideal way.

Some problems:

  • it just skips views, making it difficult to keep the database in sync with code changes
  • it uses a truncate for tables which commits the open transaction. This can lead to query inconsistency from external queriers.
  • it makes materialization code super complicated on pretty much every database dbt supports

Caveats

We'll need to:

  • remove the --non-destructive flag
  • cleanse materializations of non-destructive logic (might be tricky, but will be a huge improvement)
  • note specific places where we've needed to make weird workarounds for non-destructive builds, like here

This is one of the oldest and most neglected features in dbt, so we should take extra care to see if there are any lingering code paths that become irrelevant once non-destructive mode doesn't exist anymore.

Who will this benefit?

dbt maintainers, folks that want to implement custom materializations

@drewbanin drewbanin added the enhancement New feature or request label Apr 25, 2019
@drewbanin drewbanin added this to the Wilt Chamberlain milestone Apr 25, 2019
@beckjake beckjake self-assigned this Apr 25, 2019
beckjake added a commit that referenced this issue Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants