User Guide

Installing the Notebook Connector (NC)

Most of NC’s dependencies are declared as “optional” in file pyproject.toml.

Here is a comprehensive list of all NC’s optional dependency categories (aka. “extras”):

Package

Description

sqlalchemy

SQLAlchemy dialect for Exasol databases

pyexasol

Python driver for connecting to Exasol databases

bucketfs

Python API to interact with Exasol Bucketfs-Service(s)

docker-db

For starting a Docker instance of the Exasol database

slc

For building custom Script Language Containers for Exasol UDFs

ibis

Portable Python dataframe library ibis-framework

transformers

An Exasol extension for using state-of-the-art pretrained machine learning models via the Hugging Face Transformers API

sagemaker

An Exasol extension to interact with AWS SageMaker from inside the database

You can install selected dependencies using the following syntax

pip install "notebook-connector [slc, docker-db]"

You can also retrieve a list of all NC’s dependency categories with the following command line, see stackoverflow/64685527:

pip install --dry-run --ignore-installed --quiet --report=- \
  exasol-notebook-connector \
  | jq --raw-output '.install[0].metadata.provides_extra|join(",")'

Managing Script Language Containers (SLCs)

The Notebook Connector (NC) supports building different flavors of Exasol Script Languages Containers using the script-languages-container-tool.

The specific options for building an SLC are stored in the Secure Configuration Storage (SCS). Each SLC is identified by an arbitrary unique name used as index into the SCS for finding the related options.

You can set the SLC options using the class method ScriptLanguageContainer.create(), with parameters

  • secrets: The SCS

  • name: The name of the SLC instance (will be converted to upper-case and must be unique)

  • flavor: The name of a template as provided by the Exasol Script Language Containers.

Method create() will then

  • Select a Language Alias for executing UDF scripts inside the SLC

    • See section Define your own script aliases on docs.exasol.com.

    • The Language Alias will use prefix custom_slc_ followed by the specified name

    • Consecutive call to method deploy() will overwrite the SLC using the same Language Alias.

  • Save the flavor to the SCS indexed by the SLC’s name.

  • Raise an error if the name has already been used.

  • Clone the SLC Git repository to the local file system.

The constructor of class ScriptLanguageContainer verifies the SCS to contain the flavor and the SLC repository to be cloned to the local file system.