dbt-labs / dbt-labs/dbt-adapters
[ADAP-1096] [feature] Dynamic Tables: allow altering and updating model definition (`SELECT`) without a full refresh
- Dominant language
- Python
- Stars
- 233
- Forks
- 362
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 9
Description
### Is this a new bug in dbt-snowflake?
- [X] I believe this is a new bug in dbt-snowflake
- [X] I have searched the existing issues, and I could not find an existing issue for this bug
### Current Behavior
When I alter the model materialized as dynamic table and deploy it the same way as I deploy other materializations (view, table) - it seems to deploy properly, highlighted by the messages
> dbt build --select your_model
> 13:14:48 1 of 12 START sql dynamic_table model your_model_v1 [RUN]
> 13:14:51 1 of 12 OK created sql dynamic_table model your_model_v1 [SUCCESS 1 in 3.21s]
but in reality - the model is not being updated, only the dt parameters are being updated.
The experience is different then with using views or regular tables and the messages shown above also do not match what is happening on the database.
I just discovered that [comment: 'Dynamic table SQL cannot be updated; the dynamic table must go through a --full-refresh'](https://docs.getdbt.com/reference/resource-configs/snowflake-configs#limitations), but only as a result of serious head scratching.
Combined with dbt-labs/dbt-adapters#726 it is really undermining the first great impression that I had of dynamic tables implementation.
### Expected Behavior
Ideally the dynamic table code should be always updated when the model changes, without the need to specify additional parameters.
At minimum
1. The message "OK created sql dynamic_table model your_model_v1" should be changed to something "OK updated dynamic table model parameters for your_model_v1"
2. In document https://docs.getdbt.com/reference/resource-configs/snowflake-configs, in the example describing the dynamic table and the "Project file"/"Property file"/"Config block" - please add parameter +full_refresh: true
### Steps To Reproduce
It's a known limitation
### Relevant log output
_No response_
### Environment
```markdown
- OS: Windows 10
- Python: 3.10.5
- dbt-core: 1.7.4
- dbt-snowflake: 1.7.1
```
### Additional Context
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.