Skip to main content

faucet_sink_delta/
lib.rs

1#![cfg_attr(docsrs, feature(doc_cfg))]
2
3//! # faucet-sink-delta
4//!
5//! Apache Delta Lake sink for the [`faucet-stream`](https://crates.io/crates/faucet-stream)
6//! ecosystem. Appends JSON records to a Delta table on the local filesystem or
7//! cloud object storage (S3 / Azure / GCS) via the Rust
8//! [`deltalake`](https://crates.io/crates/deltalake) crate — the idiomatic,
9//! high-throughput way to land data for Databricks (and Spark, Trino, DuckDB,
10//! Microsoft Fabric) at the open table-format level.
11//!
12//! - Lazily creates the table from the inferred schema on first write
13//!   (`create_if_not_missing`), honouring `partition_by`.
14//! - Appends one atomic Delta commit per [`flush`](faucet_core::Sink::flush).
15//! - **Append-only in v1** — [`Sink::supported_write_modes`](faucet_core::Sink::supported_write_modes)
16//!   returns `[Append]` (MERGE/upsert is a version-gated follow-up).
17//! - No datafusion dependency: append uses delta-rs's low-level
18//!   `RecordBatchWriter`.
19//!
20//! Cloud backends are opt-in cargo features: `s3`, `azure`, `gcs`.
21
22mod config;
23mod sink;
24
25pub use config::{DEFAULT_SAMPLE_SIZE, DeltaSinkConfig};
26pub use sink::DeltaSink;
27
28// Re-export the shared connection/credentials types so downstream users need
29// only depend on this crate.
30pub use faucet_common_delta::{DeltaConnection, DeltaCredentials};
31
32mod descriptor;
33pub use descriptor::DESCRIPTOR;