Skip to main content

Module pipeline_ddl

Module pipeline_ddl 

Source
Expand description

Declarative pipeline DDL: CREATE SOURCE / CREATE SINK / START PIPELINE.

This is the SQL surface for the Tier-2 pipeline layer, following the same lightweight prefix-match approach as crate::incremental_view. It is a metadata layer only: it parses and registers source/sink declarations. Execution of START PIPELINE happens in krishiv-api, which resolves the registered specs against a Session and compiles them to session.pipeline()…run().

§Grammar

CREATE SOURCE orders AS SELECT * FROM orders_raw;          -- bounded query source
CREATE INCREMENTAL VIEW revenue AS SELECT ... FROM orders; -- transform (see incremental_view)
CREATE SINK revenue_out FROM revenue;                      -- collect view output
START PIPELINE revenue_out;                                -- run; returns sink output
DROP SOURCE orders;  DROP SINK revenue_out;

Structs§

ConnectorSpec
A connector reference: a kind (parquet, kafka, …) plus key/value options.
PipelineRegistry
SQL-layer registry of declared pipeline sources and sinks (metadata only).
SinkSpec
A declared sink: which view’s output it collects, and optionally where it is written (a connector). With no connector, the output is returned as a result set by START PIPELINE.

Enums§

PipelineStatement
A parsed pipeline DDL statement.
SourceSpec
A declared source: either a bounded SQL query (fed as insertions) or a connector (e.g. PARQUET(path='…')).

Functions§

execute_pipeline_ddl
Apply a CREATE/DROP pipeline DDL to the registry. START PIPELINE is not handled here (it needs the krishiv-api execution layer); it returns Ok(None) so the caller can intercept it.
parse_pipeline_statement
Parse a pipeline DDL statement, or Ok(None) if it is not one.