dbt-labs / dbt-labs/dbt-adapters
[Feature] Custom strategy for incremental models when table type is iceberg
- Dominant language
- Python
- Stars
- 233
- Forks
- 362
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 9
Description
### Is this your first time submitting a feature request?
- [X] I have searched the existing issues, and I could not find an existing issue for this feature
### Describe the feature
I would like to use a custom merge strategy for incremental models in case of `iceber` tables.
For example
```sql
{{
config(
unique_key=['id'],
materialized='incremental',
table_type='iceberg',
incremental_strategy='custom_merge',
...
)
}}
```
however, I found a restriction [here](https://github.com/dbt-athena/dbt-athena/blob/f1af36238c7e5b97c380beaba824fdfa2dee98e1/dbt/include/athena/macros/materializations/models/incremental/helpers.sql#L4) to do that, and I got
```sh
Incremental models on Iceberg tables only work with 'append' or 'merge' (v3 only) strategy.
```
Is there a main reason for this restriction?
### Describe alternatives you've considered
_No response_
### Who will this benefit?
Anyone that want to use a [custom strategy](https://docs.getdbt.com/docs/build/incremental-strategy#custom-strategies) for incremental models in `iceberg` tables.
### Are you interested in contributing this feature?
yes
### Anything else?
[custom strategy](https://docs.getdbt.com/docs/build/incremental-strategy#custom-strategies)
Contributor guide
Assessment
This issue has not been assessed yet.