dbt-labs / dbt-labs/dbt-adapters
[Bug] merge_update_columns: [] updates all columns
- Dominant language
- Python
- Stars
- 233
- Forks
- 362
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 9
Description
### Is this a new bug?
- [x] I believe this is a new bug
- [x] I have searched the existing issues, and I could not find an existing issue for this bug
### Which packages are affected?
- [ ] dbt-adapters
- [ ] dbt-tests-adapter
- [x] dbt-athena
- [x] dbt-athena-community
- [ ] dbt-bigquery
- [ ] dbt-postgres
- [ ] dbt-redshift
- [ ] dbt-snowflake
- [ ] dbt-spark
### Current Behavior
I have a model with
```
models:
- name: model_name
config:
materialized: incremental
incremental_strategy: merge
unique_key: key
merge_update_columns: []
table_type: iceberg
```
On the incremental run conflicting rows are completly overriden
### Expected Behavior
conflicting rows are not updated
### Steps To Reproduce
1. Have an incremental model with above config and SQL like `SELECT 'key' AS key, random() AS rand`
2. Run the model once
3. query the tabel and note down the random value
4. Run the model again
5. query table again and see that random value is different
### Relevant log output
```shell
```
### Environment
```markdown
- OS:
- Python: 3.12.13
- dbt-adapters:1.18.0
- dbt-athena-community:1.8.4
```
### Additional Context
I'm using dbt-athena with iceberg tables.
I can achieve the expected behaviour by specifying the unique_key columns in merge_update_columns.
Contributor guide
Assessment
This issue has not been assessed yet.