Custom Functions

Hydrolix provides the ability to create user defined functions

Custom Functions

Hydrolix custom functions are created using the API and are scoped to specific Projects (to avoid namespace collision).

Custom function configuration follows a similar method as can be found here -

To Specify your function with the API you should define it as follows:


The sql section of the function config corresponds to the expression which immediately follows:
CREATE FUNCTION <function name> AS ...

POST https://{hostname}{org_id}/projects/{project_id}/functions/
Authorization: Bearer {{access_token}}
Content-Type: application/json

     "sql": "(x, k, b) -> k*x + b;",
     "name": "linear_equation"
sqlThe functions specification.
nameThe name of the function

Example Custom Function usage

    {{projectname}}_linear_equation(number, 2, 1)
FROM numbers(3)

β”Œβ”€number─┬─plus(multiply(2, number), 1)─┐
β”‚      0 β”‚                            1 β”‚
β”‚      1 β”‚                            3 β”‚
β”‚      2 β”‚                            5 β”‚