Skip to main content

Schema policy.

Schema policy controls how much drift is acceptable before a target write. It should become stricter as data moves from raw capture to curated consumption.

Policies​

PolicyBehaviorTypical use
permissiveAllows broad schema movement.Raw landing and early exploration.
additive_onlyAllows new columns, blocks removals and unsafe type changes.Silver curated tables.
strictRequires source and target schema alignment.Gold consumption models.

Examples​

schema_policy: additive_only
allow_type_widening: true

delta_properties:
delta.enableChangeDataFeed: "true"
delta.autoOptimize.optimizeWrite: "true"

Change handling​

New columns​

Allowed by permissive and additive_only; recorded in schema-change evidence.

Removed columns​

Blocked by curated policies. ContractForge does not automatically drop columns.

Type changes​

Blocked unless the change is explicitly considered safe widening and allow_type_widening is enabled.

Control columns​

Framework technical columns are ignored when comparing source business schema.

Audit​

SELECT target_table, change_type, column_name, previous_type, new_type, changed_at_utc
FROM ops.ctrl_ingestion_schema_changes
ORDER BY changed_at_utc DESC;