DB
SQL Reference

CREATE TRANSFORM

Define a continuous pipeline that writes into a target table and stays fresh through PSI routing.

Synopsis

CREATE TRANSFORM <name> INTO <target> AS SELECT <projection> FROM <source> [...];

The body must be an AS SELECT, must name an existing INTO target, and must project the target's primary key column(s).

Examples

CREATE TRANSFORM t_a INTO k AS SELECT id, v FROM src;

Transforms compose — chain one target into the next:

CREATE TRANSFORM t_b INTO k2 AS SELECT id, v AS v2 FROM k;

Lifecycle

SHOW TRANSFORMS;
ALTER TRANSFORM t_a PAUSE;
ALTER TRANSFORM t_a RESUME;
DROP TRANSFORM t_a;

Paused state is durable and survives restart/replay; resume catches up from the reflected position (gap-free recovery).

Observe transforms in system.transforms: source, target, state, reflected position, lag, rows emitted, and last error.

TODO-verify: aggregating/windowed transform-body function spellings. The engine supports transform bodies over aggregates and temporal reads; confirm exact window function names against your release.

See also

On this page