dbt-labs / dbt-athena

The athena adapter plugin for dbt (https://getdbt.com)
https://dbt-athena.github.io
Apache License 2.0
228 stars 100 forks source link

fix: Remove non-current iceberg columns from catalog #731

Closed svdimchenko closed 1 month ago

svdimchenko commented 1 month ago

Description

Remove non-current iceberg columns from catalog

Models used to test - Optional

{{
    config(
        materialized="table",
        table_type="iceberg",
        post_hook="alter table model drop column to_drop"
    )
}}
select 1 as id, 'to_drop' as to_drop

Previously, dbt docs generate command generated catalog.json artifact which included to_drop column as well, however it did not exist in current table version. Current PR fixes this behaviour and stores in catalog.json file only actual columns.

Checklist

nicor88 commented 1 month ago

Should fix https://github.com/dbt-labs/dbt-athena/issues/726

nicor88 commented 1 month ago

@colin-rogers-dbt please have a look.