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: edge case fix on iceberg target table being dropped instead on being renamed first #667

Closed nicor88 closed 5 months ago

nicor88 commented 5 months ago

Description

See https://getdbt.slack.com/archives/C013MLFR7BQ/p1717497450266499

Pretty much https://github.com/dbt-athena/dbt-athena/pull/625 introduced a regression that was not letting iceberg working in an full high available mode. This PR cover the issue, and add functional tests to catch these edge case. Plus it introduce some improvements that allow to work properly in some restrictive LF permission models, where drop can happen only on existing objects.

Models used to test - Optional

See functional tests

Checklist

nicor88 commented 5 months ago

@octiva might give some input here, as he has a LF env with restricted policies, and we want to be sure that all works fine.

nicor88 commented 5 months ago

@octiva it will be good if you can test this feature again in your environment to see if all works as expected. Thanks.

@Avinash-1394 I hope that I cover and addressed your question/suggestion. Feel free to have a look.