Skip to content

view materialization silently serves stale columns after a skipped rebuild #820

Description

@Benjamin-Knight

Issue

A view model whose compiled SQL is unchanged has its rebuild skipped (a no-op is run instead of CREATE/ALTER). But if a table the view selects * from changes shape — columns added, dropped, or reordered — SQL Server's cached column metadata for the view goes stale, since that cache is only refreshed by an actual CREATE/ALTER VIEW.

The view keeps reporting old columns under old names/positions, even though every dbt run reports success (including --full-refresh, since the skip isn't gated on it).

Repro

create view_a as select * from ref('table_a'), run once, then add a column to table_a and run again with view_a's SQL unchanged. view_a still reports its old column list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions