# User-defined functions

Write custom per-row logic in Materialize with jq programs.




> For the complete documentation index, see [llms.txt](https://materialize.com/docs/llms.txt).









  <div class="warning">
    <strong class="gutter">Unreleased</strong>
    This feature will be released in
    <a href="https://materialize.com/docs/markdown-docs/releases/index.md#release-notes"><strong>v26.52</strong></a>.
    It may not be available in your region yet.
    The release is scheduled to complete by <strong>November 25, 2026</strong>.
  </div>



## `jq()`-based user-defined functions

The [`jq`](https://materialize.com/docs/markdown-docs/sql/functions/jq/index.md) function runs a
[jq program](https://jqlang.org/manual/) on a [`jsonb`](https://materialize.com/docs/markdown-docs/sql/types/jsonb/index.md)
value, one row at a time. List operations such as sorting and deduplicating
use less memory than the equivalent SQL.

| Guide | Description |
|-------|-------------|
| [Write functions with jq](https://materialize.com/docs/markdown-docs/transform-data/user-defined-functions/jq/index.md) | Sort and deduplicate lists in a `jsonb` column, and compare the plan with SQL. |
| [`jq` function reference](https://materialize.com/docs/markdown-docs/sql/functions/jq/index.md) | Syntax, behavior, and examples. |


## Pages in this section

- [Write functions with jq](https://materialize.com/docs/markdown-docs/transform-data/user-defined-functions/jq/index.md): Sort, deduplicate, and reshape lists with the jq function.
