knut-bifrost 0.1.3

Bifröst — watch lakehouse tables (Iceberg via Spark Connect) and materialise them as a FalkorDB property graph
Documentation
//! # knut-bifrost
//!
//! The bridge between the table world and the graph world: watch lakehouse
//! tables (Iceberg via Spark Connect) and continuously materialise them as a
//! FalkorDB property graph, through a declarative-or-custom transform fabric.
//!
//! See `docs/bifrost-design.md` for the full design.
//!
//! ```no_run
//! # #[cfg(feature = "spark")]
//! # async fn demo() -> knut_bifrost::Result<()> {
//! use std::time::Duration;
//! use knut_bifrost::{
//!     Listener, MappingSpec, TransformRegistry, SyncState,
//!     sink::FalkorDbSink, source::SparkConnectSource,
//! };
//!
//! let spec = MappingSpec::load("bifrost.yml")?;
//! let source = SparkConnectSource::connect("sc://spark:15002").await?;
//! let sink = FalkorDbSink::connect("redis://127.0.0.1:6379", "social").await?;
//! let state = SyncState::open("bifrost-state.json")?;
//!
//! let mut listener = Listener::new(spec, TransformRegistry::new(), source, sink, state);
//! listener.run(Duration::from_secs(30), |round| {
//!     println!("{round:?}");
//!     true
//! }).await?;
//! # Ok(())
//! # }
//! ```

mod tests;

pub mod airflow;
pub mod error;
#[cfg(feature = "flight")]
pub mod flight;
pub mod listener;
pub mod mapping;
pub mod metrics;
#[cfg(feature = "metrics-http")]
pub mod metrics_http;
pub mod mutation;
pub mod registry;
pub mod sink;
pub mod source;
pub mod state;
pub mod testmatrix;
pub mod transform;
#[cfg(feature = "wasm")]
pub mod wasm;

pub use airflow::{AssetEmitter, AssetEvent, emit_round, round_to_events};
pub use error::{BifrostError, Result};
#[cfg(feature = "flight")]
pub use flight::FlightTransform;
pub use listener::{Listener, RoundReport};
#[cfg(feature = "skade")]
pub use listener::watch_iceberg_delta;
pub use mapping::{MappingSpec, PipelineStep, SyncMode, TableMapping};
pub use metrics::{Backoff, Metrics, render_prometheus};
#[cfg(feature = "metrics-http")]
pub use metrics_http::{MetricsHandle, MetricsServer};
pub use mutation::{EdgeSet, GraphMutation, SinkReport, VertexDelete, VertexSet};
pub use registry::TransformRegistry;
pub use source::FileSource;
#[cfg(feature = "skade")]
pub use source::{DeltaPlan, IcebergSource};
pub use state::{SyncState, TableState};
pub use transform::{
    ChangeRows, EdgeTransform, TableContext, Transform, VertexTransform, deletes_from_change_rows,
    is_changelog_batch, partition_change_rows,
};
#[cfg(feature = "wasm")]
pub use wasm::WasmTransform;