Use Append mode for queries with no aggregation or with watermarked aggregations where only finalized rows are emitted; rows are written once and never updated.
Use Update mode for aggregations where each micro-batch emits only the rows that changed since the last batch; the sink must support upserts (e.g., databases, Delta Lake MERGE).
Use Complete mode for aggregations without watermarks where the entire result table is rewritten each micro-batch; requires the result set to fit in executor memory.
Select the mode in writeStream.outputMode('append' | 'update' | 'complete').
Check compatibility: non-aggregated queries only support Append; stateful aggregations with watermarks support Append and Update; global aggregations support Update and Complete.
Known gotchas
Complete mode reprocesses and rewrites the full result every batch; it is unsuitable for high-cardinality keys or large result sets.
Append mode on a watermarked aggregation only emits rows after the watermark passes the window end, introducing output latency equal to the watermark delay.
Using Update mode with a file sink is not supported; file sinks only support Append.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp