Expand description
§Databricks Zerobus Ingest SDK
A high-performance Rust client for streaming data ingestion into Databricks Delta tables.
§Quick Start
ⓘ
use databricks_zerobus_ingest_sdk::{ZerobusSdk, JsonValue};
let sdk = ZerobusSdk::builder()
.endpoint(zerobus_endpoint)
.unity_catalog_url(uc_endpoint)
.build()?;
let stream = sdk
.stream_builder()
.table("catalog.schema.table")
.oauth(client_id, client_secret)
.json()
.build()
.await?;
// Ingest a record and wait for acknowledgment
let offset = stream.ingest_record_offset(JsonValue(my_record)).await?;
stream.wait_for_offset(offset).await?;
stream.close().await?;See the examples/ directory for complete working examples.
Modules§
- databricks
- schema
- Convert a Unity Catalog table schema into a protobuf
DescriptorProto. - stream_
options - Shared configuration options for stream creation and operation.
Structs§
- Default
Token Factory - Default OAuth 2.0 token factory for Unity Catalog authentication.
- Json
String - Wrapper for pre-serialized JSON strings.
- Json
Value - Wrapper for JSON-serializable objects with automatic serialization.
- OAuth
Headers Provider - The default headers provider that uses OAuth 2.0 with Unity Catalog.
- Offset
IdGenerator - Generates monotonically increasing offset IDs for ingested records.
- Proto
Bytes - Wrapper for pre-serialized protobuf bytes.
- Proto
Message - Wrapper for protobuf messages with automatic serialization.
- Proxy
Connector - A proxy connector for the gRPC channel.
- Secure
TlsConfig - Secure TLS configuration using system CA certificates.
- Stream
Builder - A fluent builder for creating Zerobus ingestion streams.
- Stream
Configuration Options - Configuration options for stream creation, recovery of broken streams and flushing.
- Zerobus
Sdk - The main interface for interacting with the Zerobus API.
- Zerobus
SdkBuilder - Builder for creating a
ZerobusSdkinstance with fluent configuration. - Zerobus
Stream - Represents an active ingestion stream to a Databricks Delta table.
Enums§
- Encoded
Batch - Encoded
Batch Iter - Encoded
Record - Stream
Type - The type of the stream connection created with the server. Currently we only support ephemeral streams on the server side, so we support only that in the SDK as well.
- Zerobus
Error - Represents all possible errors that can occur when using Zerobus.
Constants§
- DEFAULT_
SDK_ IDENTIFIER - Default identifier the SDK sends as the HTTP
user-agentheader on every request. UseZerobusSdkBuilder::application_nameto append an application suffix.
Traits§
- AckCallback
- Callback trait for receiving acknowledgment notifications.
- Headers
Provider - A trait for providing custom headers for gRPC requests.
- TlsConfig
- Trait for TLS configuration strategies.
Type Aliases§
- Connector
Factory - Signature for caller-supplied proxy selection. Given the target host,
return a configured connector or
Nonefor a direct connection. - Json
Encoded Record - A type alias for a JSON-encoded record.
- Offset
Id - Offset ID type representing a logical (or physical) position in the stream.
- Proto
Encoded Record - A type alias for a protobuf-encoded record.
- Zerobus
Result