pub struct TransformationEngine {
pub ctx: SessionContext,
/* private fields */
}Fields§
§ctx: SessionContextImplementations§
Source§impl TransformationEngine
impl TransformationEngine
pub fn new() -> Self
Sourcepub fn load_project_config(
&self,
project_dir: &Path,
) -> Result<Arc<RbtProjectConfig>>
pub fn load_project_config( &self, project_dir: &Path, ) -> Result<Arc<RbtProjectConfig>>
Load (or reuse cached) project config for project_dir.
Sourcepub fn clear_project_cache(&self)
pub fn clear_project_cache(&self)
Clear cached project config (tests / multi-project hosts).
Sourcepub async fn register_iceberg_catalog(
&self,
catalog_name: &str,
catalog: Arc<dyn Catalog>,
) -> Result<()>
pub async fn register_iceberg_catalog( &self, catalog_name: &str, catalog: Arc<dyn Catalog>, ) -> Result<()>
Registers an Apache Iceberg catalog directly into the DataFusion query context.
Sourcepub async fn execute_sql(&self, sql: &str) -> Result<SendableRecordBatchStream>
pub async fn execute_sql(&self, sql: &str) -> Result<SendableRecordBatchStream>
Executes a SQL transform query against registered tables.
Sourcepub async fn execute_dag(
&self,
dag: &ModelDag,
project_dir: impl AsRef<Path>,
output_dir: impl AsRef<Path>,
) -> Result<DagExecutionSummary>
pub async fn execute_dag( &self, dag: &ModelDag, project_dir: impl AsRef<Path>, output_dir: impl AsRef<Path>, ) -> Result<DagExecutionSummary>
Executes a full pipeline DAG tier by tier.
Loads materialize: policy from rbt_project.yml when present (defaults to
lake-as-truth Parquet re-read for ref()).
Before any model SQL runs, bronze sources declared in staging frontmatter are
registered via register_bronze_sources_for_dag.
Sourcepub async fn execute_dag_with_materialize(
&self,
dag: &ModelDag,
project_dir: impl AsRef<Path>,
output_dir: impl AsRef<Path>,
materialize: &MaterializeConfig,
) -> Result<DagExecutionSummary>
pub async fn execute_dag_with_materialize( &self, dag: &ModelDag, project_dir: impl AsRef<Path>, output_dir: impl AsRef<Path>, materialize: &MaterializeConfig, ) -> Result<DagExecutionSummary>
Like [execute_dag] but with an explicit MaterializeConfig (tests / library).
Sourcepub async fn preview_model(
&self,
full_dag: &ModelDag,
project_dir: impl AsRef<Path>,
output_dir: impl AsRef<Path>,
model_name: &str,
limit: usize,
) -> Result<PreviewResult>
pub async fn preview_model( &self, full_dag: &ModelDag, project_dir: impl AsRef<Path>, output_dir: impl AsRef<Path>, model_name: &str, limit: usize, ) -> Result<PreviewResult>
Preview a single model: materialize ancestors, then run target SQL with LIMIT.
Does not write the target model to the lake. Bronze + ancestor ref() tables
are registered as for a normal run. limit is clamped to 1..=10_000.
Sourcepub async fn execute_dag_with_config(
&self,
dag: &ModelDag,
project_dir: impl AsRef<Path>,
output_dir: impl AsRef<Path>,
config: &RbtProjectConfig,
) -> Result<DagExecutionSummary>
pub async fn execute_dag_with_config( &self, dag: &ModelDag, project_dir: impl AsRef<Path>, output_dir: impl AsRef<Path>, config: &RbtProjectConfig, ) -> Result<DagExecutionSummary>
Full DAG execution with a pre-loaded project config (roots, scan limits, materialize).
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TransformationEngine
impl !RefUnwindSafe for TransformationEngine
impl !UnwindSafe for TransformationEngine
impl Send for TransformationEngine
impl Sync for TransformationEngine
impl Unpin for TransformationEngine
impl UnsafeUnpin for TransformationEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for T
impl<T> Downcast for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more