dbt-labs / dbt-adapters

Apache License 2.0
25 stars 35 forks source link

[Feature] Materialized Views should allow altering definition `SELECT` without `--full-refresh` #234

Open dataders opened 4 months ago

dataders commented 4 months ago

Is this your first time submitting a feature request?

Describe the feature

Expected workflow

  1. define a .sql model file with materialized="materialized_view" or materialized="dynamic_table"
  2. run the model so it creates
  3. modify the SQL in the model file
  4. run the model, and the Dynamic Table is ALTERed to have the new SQL without a `--full-refresh

This is how users interact with View and Table materializations, and have come to expect this for MVs & DTs. However no MV or DT implementation supports this today

It is possible to do this, but requires non-trivial engineering work to compare the current compiled model definition against what the Dynamic Table currently has, which is something we do not do today.

https://github.com/dbt-labs/dbt-snowflake/issues/889 https://github.com/dbt-labs/dbt-labs-experimental-features/issues/22

Describe alternatives you've considered

We keep this limitation, but make it clearer to people

Who will this benefit?

Users of MV/DTs who don't want to already loaded data, just the data that is added moving forward.

Are you interested in contributing this feature?

No response

Anything else?

No response