Floe resolves accepted/rejected write behavior from sink.write_mode.
Supported values:
overwrite(default): existing output parts are replaced before writing new output.append: new output parts are added without deleting existing ones.merge_scd1: SCD1 upsert keyed byschema.primary_keyon Delta or DuckDB accepted sinks.merge_scd2: SCD2 merge keyed byschema.primary_keyon Delta or DuckDB accepted sinks.
For accepted Delta sinks, standard write modes stay strict by default.
schema.schema_evolution.mode: strictpreserves the previous behavior: source and target Delta schemas must already be compatible.schema.schema_evolution.mode: add_columnsenables additive-only Delta schema evolution forappendandoverwrite.- Only new columns present in the source schema may be added to the target Delta table.
- Existing columns must remain compatible; drop/rename/type-change flows are rejected.
- When enabled and no new columns are present, Floe records a no-op schema-evolution report block.
- When columns are added, Floe emits a structured
schema_evolution_appliedevent and records the added column names in the entity run report. - Adding columns to already partitioned Delta tables is rejected in this phase.
- Accepted sink format must be
deltaorduckdb. schema.primary_keyis required and is used as merge key.- Source rows are validated for merge-key uniqueness during row checks.
In
policy.severity=warn, duplicate merge-key rows are rejected before merge so only unambiguous rows are merged. - On key match: update non-key columns from source.
sink.accepted.merge.ignore_columnscan exclude additional business columns from SCD1 update sets.- On missing key: insert source row.
- Strict schema handling remains the default behavior.
schema.schema_evolution.mode: add_columnsenables additive-only Delta schema evolution for merge writes.- New non-key business columns may be added before the merge commit.
- Existing columns must remain compatible; drop/rename/type-change flows are rejected.
- Merge-key columns cannot be introduced by schema evolution.
- DuckDB merge writes use DuckDB's native
MERGE INTO; DuckDB schema evolution is not supported. - Delta merge writes use Delta native merge (
MERGE INTO) through delta-rs/DataFusion. - Single-writer assumption: sink-level commit or lock conflicts are returned as clear write errors.
- Accepted sink format must be
deltaorduckdb. schema.primary_keyis required and is used as merge key.- Source rows are validated for merge-key uniqueness during row checks.
In
policy.severity=warn, duplicate merge-key rows are rejected before merge so only unambiguous rows are merged. - Floe manages SCD2 system columns in Delta and DuckDB target tables:
__floe_is_current__floe_valid_from__floe_valid_to
sink.accepted.merge.scd2can override these system column names.- Changed current rows are closed (
is_current=false,valid_to=current_timestamp()), then new current versions are inserted. - Missing keys are inserted as new current rows.
- Unchanged current rows are left as-is.
- Reported merge metrics for
merge_scd2:closed_count= rows closed in the current target set.inserted_count= rows inserted as new current versions (changed + brand new keys).unchanged_count= source rows that matched active target rows with no change.updated_countis preserved for backward compatibility and matchesclosed_count.
- Change detection columns are resolved as:
sink.accepted.merge.compare_columnswhen configured- otherwise all non-key business columns minus
sink.accepted.merge.ignore_columns
- Strict schema handling remains the default behavior.
schema.schema_evolution.mode: add_columnsenables additive-only Delta schema evolution for merge writes.- New business columns may be added while Floe preserves SCD2 system columns.
- Existing columns must remain compatible; drop/rename/type-change flows are rejected.
- Merge-key columns cannot be introduced by schema evolution.
- DuckDB merge writes use DuckDB's native
MERGE INTO; DuckDB schema evolution is not supported. - Single-writer assumption: sink-level commit or lock conflicts are returned as clear write errors.
sink.write_mode is shared with rejected output:
overwrite: first rejected write in a run starts fresh, subsequent rejected files append.append: rejected files append.merge_scd1: rejected files append (merge logic applies only to the accepted Delta/DuckDB sink).merge_scd2: rejected files append (merge logic applies only to the accepted Delta/DuckDB sink).