User-Defined Function Implementation

User-Defined Functions (UDFs) in Kinetica in Azure are implemented in Python.

Tutorial

The Python UDF Tutorial details the implementation & execution of distributed UDFs in the Python UDF APIs. Also provided are examples of UDFs, including a simple table copy and a more complex integration into a machine-learning library's demo program.

UDF Prerequisites

UDF API Installation

The Kinetica Python UDF API is accessible via GitHub.

  1. In the desired directory, run the following but be sure to replace <kinetica-version> with the name of the installed Kinetica version, e.g., v7.1:

    1
    
    git clone -b release/<kinetica-version> --single-branch https://github.com/kineticadb/kinetica-udf-api-python.git
    
  2. Set the Python command environment variable:

    1
    
    export PYTHON_CMD=python
    
  3. Add the Python UDF API directory to the PYTHONPATH:

    1
    
    export PYTHONPATH=$PYTHONPATH:$(cd kinetica-udf-api-python;pwd)
    

Development

Python UDF API
A reference for the Python UDF API
Running Python UDFs
How to run a Python UDF in the Kinetica environment
UDF Python Examples
Complete examples of distributed UDFs