Thalweg · API reference ← Main docs

Module reconcile

Module reconcile 

Source
Expand description

Emit-time type reconciliation — the write-boundary guard (blueprint §5.2).

The predecessor lost whole lanes when Arrow Flight rejected a batch whose column types did not match the target. This is a describe-time comparison of each incoming Arrow type against the declared target column: a genuine mismatch is surfaced loudly with the column named — never an opaque per-batch rejection or a silent NULL.

Two mismatches are named:

  • nested-into-STRING — a Struct/List/Map into a STRING column. Resolve it explicitly upstream: declare the column with its real nested type, or write to_json(col) in the transform (the shipped twg-udf UDF). The sink deliberately does not auto-JSON-encode — that would silently turn structure into an opaque blob and hide the mismatch (ADR-0065 D1).
  • tz-aware-into-NTZ — a Timestamp(_, Some(tz)) into a TIMESTAMP_NTZ column. The fix is upstream; the sink surfaces the mismatch loudly.

Enums§

Reconciliation
What reconciliation decided for one column.

Functions§

reconcile
Reconcile an incoming Arrow schema against the declared target columns.