# Register a user-defined function

Control / script

A variant of [Run a script](https://meridian.online/operations/run-a-script).

Define a scalar, aggregate or window function in code so that SQL or expressions can call it by name.

Page: <https://meridian.online/operations/run-a-script/register-user-defined-function>

## Status

Not built yet.

arcform does not do this yet; it would live in how a Protocol runs. [Its place on the roadmap](https://meridian.online/roadmap#run-a-script)

## What other tools call it

Meridian's classification; an independent blind rating agreed on 95.7% of 324 rows (variant, version 3).

- Apache DataFusion: [`User Defined Window and Aggregate Functions`](https://datafusion.apache.org/user-guide/features.html) (read 2026-09-27)
- Ibis: [`AggUDF`](https://github.com/ibis-project/ibis/blob/05d2b293344e86cb41c1a426071734f7e270335a/ibis/expr/operations/udf.py) (read 2026-09-27)
- Ibis: [`AnalyticVectorizedUDF`](https://github.com/ibis-project/ibis/blob/05d2b293344e86cb41c1a426071734f7e270335a/ibis/expr/operations/vectorized.py) (read 2026-09-27)
- Ibis: [`ElementWiseVectorizedUDF`](https://github.com/ibis-project/ibis/blob/05d2b293344e86cb41c1a426071734f7e270335a/ibis/expr/operations/vectorized.py) (read 2026-09-27)
- Ibis: [`ReductionVectorizedUDF`](https://github.com/ibis-project/ibis/blob/05d2b293344e86cb41c1a426071734f7e270335a/ibis/expr/operations/vectorized.py) (read 2026-09-27)
- Ibis: [`ScalarUDF`](https://github.com/ibis-project/ibis/blob/05d2b293344e86cb41c1a426071734f7e270335a/ibis/expr/operations/udf.py) (read 2026-09-27)
- Apache SeaTunnel: [`Calcite UDF`](https://seatunnel.apache.org/docs/transforms/calcite-udf) (read 2026-09-27)
- Apache SeaTunnel: [`SQL UDF`](https://seatunnel.apache.org/docs/2.3.13/transforms/sql-udf) (read 2026-09-27)
- SQLMesh: [`Python macro functions`](https://github.com/SQLMesh/sqlmesh/blob/23b237cea7218cc8f338b89c14f0957394a0003b/docs/concepts/macros/sqlmesh_macros.md) (read 2026-09-27)
