Thalweg · API reference ← Main docs

Crate twg_source_batch

Crate twg_source_batch 

Source
Expand description

Bounded file sources producing the shared record stream. Scaffold only.

Reader library per format (see docs/adr — batch reader selection). Four of five version in lockstep with Arrow through the codec-core re-export, which is why Polars is rejected: its nightly-API coupling was a documented failure in the predecessor system.

Parquet — parquet (arrow-rs), direct to RecordBatch CSV — arrow-csv, direct; prefers contract schema over inference JSON — arrow-json, direct; prefers contract schema over inference Excel — calamine (not arrow-native: cell values → type-map → Arrow) XML — quick-xml + our mapping (bespoke; XSD/contract-driven) Avro OCF— shares codec-avro decode (file-header schema, not registry)

Cross-format rule: prefer the contract-resolved schema; fall back to inference only when no contract is supplied. Inference on CSV/JSON/XML is lossy, so a supplied schema is both safer and faster.