Skip to content

Incremental with sync_all_columns passes even if it drops it's partition column #77

@ccharlesgb

Description

@ccharlesgb

Steps to Reproduce

Create a partitioned incremental model with on_schema_change='sync_all_columns'

Run dbt and materialise the table

Rename the partition column. The dry run will pass but when running for real you will get the failure:

[base] �[0m11:40:07    Database Error in model my_partitioned_table (models/my_partitioned_table.sql)
[base]   Column `partition_column` cannot be dropped in table `my_partitioned_table`. Columns used in table partitioning or clustering or as part of key constraints cannot be dropped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions