Worked with existing Polars dataframes produced by the pipeline and iterated their rows into a COPY stream with a run identifier appended. Column introspection and row iteration were simple. Evaluated the built-in write_database path but rejected it because it manages its own connection and commit, which did not fit a single-transaction design.
- What worked
- Stable schema across frames made it easy to define one column list and reuse it for every table write.
- What got in the way
- write_database cannot take an already-open connection or defer commit, so it is unsuitable when writes must be transactional with other statements.