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, TableProperties, ProtoMessage};
let sdk = ZerobusSdk::builder()
.endpoint(zerobus_endpoint)
.unity_catalog_url(uc_endpoint)
.build()?;
let stream = sdk.create_stream(table_properties, client_id, client_secret, None).await?;
// Ingest a record and wait for acknowledgment
let offset = stream.ingest_record_offset(ProtoMessage(my_message)).await?;
stream.wait_for_offset(offset).await?;
stream.close().await?;See the examples/ directory for complete working examples.
Modules§
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.
- Secure
TlsConfig - Secure TLS configuration using system CA certificates.
- Stream
Configuration Options - Configuration options for stream creation, recovery of broken streams and flushing.
- Table
Properties - The properties of the table to ingest to.
- 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_
X_ ZEROBUS_ SDK - Default x-zerobus-sdk header value for Rust SDK requests.
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§
- 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