Transform plugins

Transforms normalize raw source data into canonical metrics stored indataset schemas. Each transform is a Python package with an entry point — the same pattern as sources.

Built-in transform types

SQLWrite a DuckDB SQL query that reads from source tables and writes into a canonical dataset table. No Python required — just SQL.
GeofenceTag rows with a place name based on GPS coordinates and a set of user-defined geofences. Useful for commute detection, home/office/gym segmentation.
GeocodeReverse-geocode a latitude/longitude pair into a city, country, or address using a local geocoder (no external API required).
Regex extractExtract fields from text columns using named capture groups. Useful for parsing transaction descriptions, log lines, or freeform notes.
LLM categorizePass rows to a local LLM (via LLMMixNet) for categorization or tagging. Useful for transaction labelling, mood tagging, and topic extraction.
CustomImplement the Transform ABC to write any transform logic. Receives a DuckDB connection; write to any output table you declare.

Writing a custom transform

A custom transform is a Python package with ashenas.transforms entry point. The transform class receives a live DuckDB connection and declares its input tables and output table.

1

Declare inputs and output

Override source_tables (list of table names to read) and target_table (the dataset table to write into).

2

Implement run()

The run(conn) method receives a DuckDB connection. Read from source tables; write output rows intoself.target_table.

3

Register the entry point

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 underplugins/transforms/ in the repository: shenas-org/shenas Public mirror (shenas-org/shenas): Last updated 2026-05-23. Treat it as frozen; do not rely on it for current releases.

v0.17.2