Skip to content

Option to alter table attached to Materialized View on schema changes #474

@kennycontreras

Description

@kennycontreras

Is your feature request related to a problem? Please describe.

When the query underlying the MV is changed, and we run the dbt model over the existing MV, an update to the MV will be triggered. However, the table attached to the MV remains unchanged, even if schema changes have occurred. This can lead to schema mismatches or runtime issues.

Describe the solution you'd like

I would be helpful to have a dbt model configuration option to alter the table when schema changes are detected. This would ensure consistency between the MV query and the attached table.

Describe alternatives you've considered

A pre-hook macro could potentially drop or alter the table, but this requires custom logic and the option of adding a parameter through the dbt model config is more straightforward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions