Skip to main content
A sink implements Sink, defined in the repo’s root sink.go:
  • Spec is the sink’s self-description — identity, config schema, and capabilities (what powers the catalog, same as a source’s Spec).
  • Open prepares the sink for one run.
  • Apply writes a Batch under an ApplyOptions.Policy (the write policy governing that batch), returning a WriteReceipt.
  • Commit or Abort finalizes the run.
SinkSpec.SchemaField names the pipeline-scoped config field that holds where output lands — a schema, namespace, database, or key prefix — so the server can default it from the source connection’s normalized name.

Optional capabilities

A sink can implement staged/transactional writes, key-based upserts, or typed DDL (materializing a resource’s schema ahead of its records). See Optional interfaces.

Registering it

Same pattern as a source: a register.go that registers with the engine, then a blank import wherever it should be available — see Embedding as a library.