Data Science and UDFs Examples

This section provides you with information demonstrating the capabilities of Exasol's UDFs along with tutorials. Data-science and in depth knowledge of R and Python programming languages are not required.

User Defined Functions (UDFs)

User Defined Functions (UDFs) provide you with the ability to program your own analysis, processing, or generation functions and execute them in parallel inside Exasol's high-performance cluster. By incorporating UDFs in the workflows, you can solve problems that were not solvable with plain SQL in a very efficient and elegant way. Through UDF scripts you, therefore, get a highly flexible interface for implementing nearly any requirement.

Depending on the input and output specifications, there are multiple types of UDFs:

Input
Output  

SCALAR

Single input

SET

Multiple rows as input

RETURNS

Single output

Function: executed in parallel

Example:

Aggregation function: not parallel, except for group by

Example:

 

EMITS

Multiple output rows

Generator function / Map reduce / ETL UDFs: executed in parallel

Example:

 

 

Analytical function: not parallel, except for group by

Examples:

For additional information on UDFs, refer to the UDF Scripts section in our documentation.

UDF Tutorials

The following section provides you with detailed explanation and tutorials showing the capabilities of Exasol's UDFs. Click on each link to view detailed information.

These tutorials are designed to work with the Free Trial System. Ensure you have access to the public demo system. Else sign up here to get access to the demo system hosted by Exasol for testing the data and scripts in these tutorials.

  • Python Classification Example
  • Find out how UDFs can be used in a machine learning or data science context using Python. You will learn how to test the accuracy of a model, either from a SQL client or directly from your familiar Python environment like Jupyter Notebooks.

  • R Regression Example
  • Learn how to dislay JSON data stored in a column as a table using a simple UDF.

  • Geocoding with UDFs
  • Use Exasol to add Geocodes to your data.

  • Train and Predict with R through UDFs
    Use Exasol with R and learn how to train and predict through UDFs.