Make SDK ingestion docs agent-friendly#387
Open
elenagaljak-db wants to merge 2 commits into
Open
Conversation
96faf6f to
5f0058a
Compare
Co-authored-by: Isaac Signed-off-by: elenagaljak-db <elena.galjak@databricks.com>
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.
What
Reworks the ingestion documentation across all five SDKs (Rust, Python, TypeScript, Java, Go) plus the root docs so that clients — including AI coding assistants — write performant code by default.
Why
Users (and agents) were producing slow clients that call the wait-for-acknowledgment method (
wait_for_offset/waitForOffset/WaitForOffset, or.join()on a per-record future) after every ingest. Because ingestion is asynchronous and pipelined, waiting per record forces a full server round-trip before the next record is sent, limiting throughput to ~one record per round-trip. The docs were partly to blame: every SDK led with the per-record-wait example, and the high-throughput pattern was buried far below.Changes
flush()once — as the first example in every README. Per-record waiting is presented as a legitimate tool for low-volume "confirm this specific record" cases, not the default.///, Python docstrings (sync + async), TypeScript JSDoc, Java Javadoc, Go godoc — oningest_*,wait_for_offset/flushand equivalents.flush()once.ingestRecord().join()-in-a-loop ontoingestRecordOffset()+ wait-once.CLAUDE.md(root + per-SDK) gain a "client code patterns" / performance rule for in-repo agents.NEXT_CHANGELOG.mdupdated in each SDK under Documentation.Notes
wait_for_offset_internalwaits forlast_received_offset >= target).flush()/last-offset approach (no invented APIs).This pull request and its description were written by Isaac.