Skip to content

Commit

Permalink
Starburst/Trino - on_table_exists modes are applicable to a full-refr… (
Browse files Browse the repository at this point in the history
#5524)

…esh run of an incremental model

## What are you changing in this pull request and why?
<!---
Describe your changes and why you're making them. If related to an open 
issue or a pull request on dbt Core, then link to them here! 

To learn more about the writing conventions used in the dbt Labs docs,
see the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md).
-->

## Checklist
<!--
Uncomment when publishing docs for a prerelease version of dbt:
- [ ] Add versioning components, as described in [Versioning
Docs](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-entire-pages)
- [ ] Add a note to the prerelease version [Migration
Guide](https://github.com/dbt-labs/docs.getdbt.com/tree/current/website/docs/docs/dbt-versions/core-upgrade)
-->
- [x] Review the [Content style
guide](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/content-style-guide.md)
so my content adheres to these guidelines.
- [ ] For [docs
versioning](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#about-versioning),
review how to [version a whole
page](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#adding-a-new-version)
and [version a block of
content](https://github.com/dbt-labs/docs.getdbt.com/blob/current/contributing/single-sourcing-content.md#versioning-blocks-of-content).
- [ ] Add a checklist item for anything that needs to happen before this
PR is merged, such as "needs technical review" or "change base branch."
  • Loading branch information
dataders authored May 17, 2024
2 parents 28eca10 + 86df636 commit bba3480
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion website/docs/reference/resource-configs/trino-configs.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Another way to avoid the header line length limit is to set `prepared_statements
## Materializations
### Table

The `dbt-trino` adapter supports these modes in `table` materialization, which you can configure with `on_table_exists`:
The `dbt-trino` adapter supports these modes in `table` materialization (and [full-refresh runs](/reference/commands/run#refresh-incremental-models) in `incremental` materialization), which you can configure with `on_table_exists`:

- `rename` &mdash; Creates an intermediate table, renames the target table to the backup one, and renames the intermediate table to the target one.
- `drop` &mdash; Drops and re-creates a table. This overcomes the table rename limitation in AWS Glue.
Expand Down Expand Up @@ -194,6 +194,8 @@ Use the `+on_schema_change` property to define how dbt-trino should handle colum
If your connector doesn't support views, set the `+views_enabled` property to `false`.

You can decide how model should be rebuilt in a `full-refresh` run by specifying `on_table_exists` config. Options are the same as described in [table materialization section](/reference/resource-configs/trino-configs#table)

#### append strategy

The default incremental strategy is `append`. `append` only adds new records based on the condition specified in the `is_incremental()` conditional block.
Expand Down

0 comments on commit bba3480

Please sign in to comment.