faucet_sink_file/lib.rs
1#![cfg_attr(docsrs, feature(doc_cfg))]
2//! Local file sink for faucet-stream: JSON Lines, JSON arrays, CSV, XML,
3//! Excel, Avro, Parquet and raw text to one file or a directory of rolled
4//! files — the write-side counterpart of `faucet-source-file`.
5//!
6//! The format comes from the path's extension unless one is set; `.gz` /
7//! `.zst` select compression. Every file is written beside its final name and
8//! renamed into place on flush, so a crashed run never leaves a
9//! complete-looking partial file, and `write_mode: overwrite` replaces the
10//! whole output set only when the run succeeds.
11//!
12//! **Experimental** (PRINCIPLES.md §3): this block's shape may change in a
13//! minor release; any change is called out in the changelog.
14
15mod descriptor;
16pub use descriptor::DESCRIPTOR;
17
18pub mod config;
19mod sink;
20
21pub use config::{
22 FileSinkConfig, FileSinkFormat, FileWriteMode, IfExists, JsonLinesOptions, PART_TOKEN,
23 ParquetCodec, ParquetField, ParquetOptions, ParquetType,
24};
25pub use faucet_core::{FaucetError, Sink};
26pub use sink::FileSink;