A write runs through the strategy configured for the data source. Each strategy takes the records to write plus a load strategy. The write() call resolves with no value. It either completes or throws.
External Storage #
1
2
3
4
5
6
records
→ serializer (records → a file format)
→ storage upload (write the file to object storage)
→ table manager (register/update the table via DDL)
→ cleanup (according to the load strategy)
This path needs a serializer, storage operations, and a table manager. It suits engines backed by object storage with an external table catalog. A write call without a resolvable basePath throws.
INSERT INTO #
1
2
3
4
5
6
records
→ schema mapper
→ batched statements
→ data source query (INSERT INTO)
→ optional staging + swap
This path runs entirely through SQL and does not depend on object storage.
Trino, today the only write-capable adapter #
Trino implements both preceding paths, selected by its writeConfig. This page covers the mechanics every write-capable adapter shares, not any one adapter's config format. See Trino write config for the two concrete shapes side by side.
Write Capability by Adapter #
| Adapter | External storage | INSERT INTO |
|---|---|---|
| Trino | Yes | Yes |
| Fabric | No — read-only adapter | No — read-only adapter |
A future write-capable adapter adds a row here, plus its own <adapter>/write-config.mdx page for the concrete shape. It does not need a new section.
Responsibility Boundaries #
Each part has a narrow job. The data source executes SQL and exposes DDL. The write strategy owns load-strategy semantics, batching, staging, and rollback. The serializer converts records to a format. Storage operations handle upload, list, and delete without knowing load strategies. The table manager handles external-table DDL only for strategies that need it.