Add turbopuffer sink documentation - #38233
Closed
nstewart wants to merge 1 commit into
Closed
Conversation
Documents keeping a turbopuffer namespace in sync with a Materialize view using the Kafka sink plus mz-tpuf-sink, following the information architecture of the Elasticsearch and OpenSearch guides. Beyond the setup steps, the guide covers the correctness properties of the path: per-timestamp transaction atomicity and the two completeness rules that make it possible, why the sink needs a Materialize connection to watch the write frontier, at-least-once delivery with idempotent keyed writes, read_committed isolation, the single-process-per-topic requirement, key and document-identity constraints, column-level patch semantics, and why attribute types are declared rather than inferred. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011Anxe7er6ZK6P62jjWqyfG
Contributor
Author
|
Reviewing the sink source to write the correctness section surfaced two discrepancies in
The type mapping table in this guide documents the observed behavior for both: Generated by Claude Code |
Contributor
Author
|
Closing in favor of #38167 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This adds comprehensive documentation for sinking Materialize results to turbopuffer, a vector database service. The documentation covers the complete pipeline: using a Kafka sink to export data from Materialize, then using the
mz-tpuf-sinkPython library to apply those changes to turbopuffer namespaces.Description
This PR adds a new documentation page (
doc/user/content/serve-results/sink/turbopuffer.md) that guides users through:Setup: Creating Kafka and schema registry connections, building a materialized view as the search document, and configuring a Kafka sink with Debezium envelope for change capture.
Running the sink: Installing and configuring
mz-tpuf-sink, a Python library that consumes from Kafka and applies changes to turbopuffer with transaction atomicity guarantees.Adding embeddings: Using transforms to compute embeddings (or other derived attributes) only when relevant columns change, avoiding unnecessary recomputation.
Validation: Querying the namespace and testing deletes to confirm the pipeline works end-to-end.
Operational details: Covering transaction atomicity, at-least-once delivery with idempotent writes, column-level updates, and type mapping between Materialize and turbopuffer.
The documentation also updates
doc/user/data/sink_external_systems.ymlto list turbopuffer as a supported external system alongside other sinks like Kafka and OpenSearch.Key design points documented:
Verification
This is documentation-only. No code changes or tests are required. The documentation follows existing patterns in the Materialize docs and references the actual
mz-tpuf-sinklibrary on GitHub.https://claude.ai/code/session_011Anxe7er6ZK6P62jjWqyfG