Skip to main content

Crate databricks_zerobus_ingest_sdk

Crate databricks_zerobus_ingest_sdk 

Source
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§

databricks

Structs§

DefaultTokenFactory
Default OAuth 2.0 token factory for Unity Catalog authentication.
JsonString
Wrapper for pre-serialized JSON strings.
JsonValue
Wrapper for JSON-serializable objects with automatic serialization.
OAuthHeadersProvider
The default headers provider that uses OAuth 2.0 with Unity Catalog.
OffsetIdGenerator
Generates monotonically increasing offset IDs for ingested records.
ProtoBytes
Wrapper for pre-serialized protobuf bytes.
ProtoMessage
Wrapper for protobuf messages with automatic serialization.
SecureTlsConfig
Secure TLS configuration using system CA certificates.
StreamConfigurationOptions
Configuration options for stream creation, recovery of broken streams and flushing.
TableProperties
The properties of the table to ingest to.
ZerobusSdk
The main interface for interacting with the Zerobus API.
ZerobusSdkBuilder
Builder for creating a ZerobusSdk instance with fluent configuration.
ZerobusStream
Represents an active ingestion stream to a Databricks Delta table.

Enums§

EncodedBatch
EncodedBatchIter
EncodedRecord
StreamType
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.
ZerobusError
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.
HeadersProvider
A trait for providing custom headers for gRPC requests.
TlsConfig
Trait for TLS configuration strategies.

Type Aliases§

JsonEncodedRecord
A type alias for a JSON-encoded record.
OffsetId
Offset ID type representing a logical (or physical) position in the stream.
ProtoEncodedRecord
A type alias for a protobuf-encoded record.
ZerobusResult