Transforms normalize raw source data into canonical metrics stored in dataset schemas. Each transform is a Python package with an entry point — the same pattern as sources.
Transform ABC to write any transform logic. Receives a DuckDB connection; write to any output table you declare.
A custom transform is a Python package with a
shenas.transforms entry point. The transform class
receives a live DuckDB connection and declares its input tables
and output table.
Override source_tables (list of table names to read)
and target_table (the dataset table to write into).
The run(conn) method receives a DuckDB connection.
Read from source tables; write output rows into
self.target_table.
Add [project.entry-points."shenas.transforms"] to
your pyproject.toml, pointing at the transform class.
Install and schedule with shenasctl transform add.
Full Transform ABC reference and examples are in the
shenas-org/shenas
repository under plugins/transforms/.