materialized field selects how a model becomes a warehouse relation.
View
Creates or replaces a database view on each build:Table
By default, creates a staging table, applies supported type and contract enforcement, runs blocking audits, and only then promotes it to the destination. A pre-promotion failure leaves the previous destination unchanged.settings.table_promotion_mode = "direct". Direct mode replaces the destination before audits, so a failed audit does not restore the old table. Direct mode rejects models that require declared-type enforcement or contract enforced; use staged promotion for those guarantees.
Incremental
On a normal incremental run, applies append, delete/insert, or merge DML from a staged delta. Delete/insert removes matching keys or cursor ranges before inserting replacement rows. Cursor configuration controls replay bounds and may split work into microbatches.--full-refresh, and a full replay-on-change rebuild use the full-table path rather than incremental DML. Microbatch models retain batched execution: a full rebuild drops the existing target, creates its replacement from the first batch, and applies later batches with incremental DML. A failed full-refresh microbatch does not preserve the previous target.
See Incremental for cursor semantics, replay, schema changes, and microbatch execution.
Snapshot
Maintains historical row versions with SCD Type 2 semantics:Custom
A project-local Python materialization can manage specialized persistence with adapter access, schema findings, query-change state, declared columns, andctx.run_audits.
config block is passed to the Python function through ctx.config. Runtime-owned @@@placeholder values remain unresolved until materialization execution.
The custom function owns staging, runtime type or contract enforcement, audit timing, promotion, and rollback. Framework final audits run after the function returns unless MaterializationResult.audit_results is populated. A custom materialization can call ctx.run_audits against a staging relation before applying changes and return those results through MaterializationResult.audit_results.
