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
…esh run of an incremental model
  • Loading branch information
damian3031 committed May 17, 2024
1 parent aa5e9fb commit b3c5fb4
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` — Creates an intermediate table, renames the target table to the backup one, and renames the intermediate table to the target one.
- `drop` — 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 b3c5fb4

Please sign in to comment.