Status
In private development. Early access by invitation. The names, options and formats on this page can change before the first release.
Platforms
Account and data
Also on this site
Platforms
Account and data
Also on this site
Status
In private development. Early access by invitation. The names, options and formats on this page can change before the first release.
A template is the tested, platform-specific form of one pipeline shape. Emolysis fills templates instead of writing pipelines from scratch, so every pipeline starts from code that already passes its tests. The template format is public, so you can read it and write your own.
A template is named <shape>.<platform>, for example scd2.databricks or cdc-merge.snowflake. Local-only examples use duckdb as the platform. Ten shapes on three platforms make thirty templates in the library.
The shape part is the id from the pipeline shapes: ingest-batch, incremental-append, cdc-merge, scd2, snapshot, backfill, late-arriving, dedupe-conform, aggregation-gold and reverse-etl. The platform part is databricks, snowflake, fabric or duckdb.
Each template is a folder:
scd2.databricks/
template.sql the template file, with named slots (or template.py)
manifest declares the template id, its slots and their types
tests/ input fixtures and the expected output for each case
cost note what drives the template's cost on its platform
constraints what the template needs from the platform profiletemplate.sql or template.py, with named slots where values go.emolysis.template/v0.The file names in the tree above are for orientation. The format specification in the public SDK repository is the source of truth for exact names.
A slot is a named value the template needs. Every slot has a type, so the agent cannot put a column list where a table name belongs:
| Type | Holds |
|---|---|
identifier | A name, such as a constraint or job name |
table | A table reference |
column | One column |
columns | A list of columns, such as a composite key |
expression | One SQL expression |
expressions | A list of SQL expressions |
string | Text |
integer | A whole number |
boolean | True or false |
duration | A length of time, such as a lookback window |
enum | One value from a fixed list |
The slots follow what each shape needs. These are the kinds of values the agent asks for, in plain words:
| Shape | Values the template needs |
|---|---|
| Ingest (batch) | Source location and format, target table, schema hints, the columns that identify a duplicate |
| Incremental append | Source, target, the watermark column and its type, an optional lookback window |
| CDC merge | Key columns, the ordering column, the operation column and its values, how deletes are handled |
| SCD Type 2 | Business key, tracked columns, where the effective date comes from, the current flag |
| Snapshot | Source, target, snapshot date column, retention period, replace or keep dated copies |
| Backfill | The pipeline to run, partition column, grain, date range, how many partitions run at once |
| Aggregation / gold | The grain, the measures and their aggregates, the dimensions, the source tables |
The slot schema tells the agent exactly what is missing. It fills slots from your catalog where it can (column names and types, keys), from your request where you said it, and asks you for the rest. Literal values are rendered for the target platform's dialect, so quoting and escaping follow that platform's rules.
Because values have types, a value of the wrong type is rejected with an invalid_params error before anything is rendered, instead of producing a broken query. See Error codes.
The public validator checks a template folder against the format: the manifest, the slot types, the fixtures and the expected outputs. A template that does not validate is not rendered.
The format and the validator are public in emolysis/template-sdk on GitHub (MIT license). You can write templates for your own recurring patterns and use them in your projects. The tested library that ships with Emolysis stays part of the product. The SDK package is not published to a registry yet.
Each library template is judged per platform:
The matrix of shapes by platforms is the scorecard for the library. A template does not count as green until it has run on the real platform. See Golden tests on DuckDB.
The library holds a template for each shape on Databricks, Snowflake and Microsoft Fabric. Their golden tests pass on DuckDB, and none has passed on a real platform yet. The template format is public as source, not as a package, and can change before the first release.
Previous
Pipeline shapes
Next
Golden tests on DuckDB