faucet_sink_singer/lib.rs
1#![cfg_attr(docsrs, feature(doc_cfg))]
2
3//! # faucet-sink-singer
4//!
5//! A bridge sink that runs an external [Singer](https://www.singer.io/) target
6//! executable and feeds it faucet records as a Singer stream — so any existing
7//! Singer target can sit at the end of a faucet pipeline, and a Meltano
8//! project can move to faucet one side at a time.
9//!
10//! - one `SCHEMA` per stream (explicit `schema`, the pipeline contract, or
11//! inferred from the records), with `key_properties` from `write_mode:
12//! upsert` keys;
13//! - one `RECORD` per record, streamed through a bounded stdin buffer
14//! (a slow target back-pressures the pipeline);
15//! - bookmarks advance only after the target confirms: an echoed `STATE`
16//! (`flush_on: state`) or a clean exit (`flush_on: exit`, the default);
17//! - `write_mode: overwrite` versions every record and sends
18//! `ACTIVATE_VERSION` after a successful run.
19//!
20//! **Tier-2 / experimental.** Using this sink reintroduces a runtime
21//! dependency (usually Python) for that pipeline, and throughput is
22//! Singer-class rather than faucet-class.
23
24pub mod config;
25mod descriptor;
26pub mod process;
27pub mod schema;
28pub mod sink;
29
30pub use faucet_core::{FaucetError, Sink};
31
32pub use config::{FlushOn, InheritEnv, SingerSinkConfig};
33pub use descriptor::DESCRIPTOR;
34pub use faucet_common_singer::{Redactor, SingerMessage, parse_line, secret_like_values};
35pub use sink::SingerSink;