Skip to content
cccskills
FreePublished on GitHub

exasol-udfs

Exasol User Defined Functions (UDFs) and Script Language Containers (SLCs). Covers `CREATE SCRIPT`, SCALAR and SET functions, variadic scripts with `EMITS(...)` and `default_output_columns`, the `ExaIterator` and `ExaMetadata` APIs, Python, Java, Lua, and R scripts, Lua execute scripts and `pquery`, BucketFS file access, GPU-accelerated UDFs, `ALTER SESSION SET SCRIPT_LANGUAGES` activation, and building custom Script Language Containers with `exaslct`, `exaslpm`, and `packages.yml`.

The English summary is being prepared. Showing the original description.

Run score Not tested

See how to install

Files included (6)

  • SKILL.md4.5 KB
  • references/create-script-syntax.md4.4 KB
  • references/lua-execute-scripts.md4.8 KB
  • references/slc-reference.md14.7 KB
  • references/udf-java-lua.md7.5 KB
  • references/udf-python.md5.7 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Exasol UDFs & Script Language Containers

UDFs extend SQL with custom logic that runs inside the Exasol cluster: per-row transforms, custom aggregation, ML inference against a model in BucketFS, external API calls, and DataFrame batch processing. They execute in a Script Language Container — a Docker-based runtime whose contents you can replace when the default packages are not enough.

Two Decisions Before Any Route

SCALAR or SET?

SCALARSET
InputOne row at a timeGroup of rows (via GROUP BY)
OutputRETURNS <type> (single value)EMITS (col1 TYPE, ...) (zero or more rows)
Row iterationNot neededctx.next() loop required
SQL usageSELECT udf(col) FROM tSELECT udf(col) FROM t GROUP BY key
Use casePer-row transformsAggregation, ML batch predict, multi-row emit

Which language?

LanguageStartupBest ForExpandable via SLC?
Python 3 (3.10 or 3.12)~200msML, data science, pandas, string processingYes
Java (11 or 17)~1sEnterprise libs, type safety, Virtual Schema adaptersYes
Lua 5.4<10msLow-latency transforms, row-level securityNo (natively compiled into Exasol)
R (4.4)~200msStatistical modeling, R model deploymentYes

Routing Algorithm

Choose the narrowest matching route. Several often apply — a Python UDF that reads a model needs routes 1 and 2 — so load all matching references.

  1. Write the CREATE SCRIPT statement — syntax for any language, variadic scripts

    • Trigger phrases: CREATE SCRIPT, SCALAR, SET EMITS, RETURNS, variadic script, dynamic parameters, EMITS(...), default_output_columns, %scriptclass, %jar, R UDF, Lua UDF
    • Load: references/create-script-syntax.md
  2. Python UDF internals — context API, type mapping, DataFrames, BucketFS reads, testing

    • Trigger phrases: Python UDF, ctx.emit, ctx.next, get_dataframe, pandas, pickle, load model, udf-mock-python, dynamic import, memory limit
    • Load: references/udf-python.md
  3. Java or Lua UDF internals — ExaIterator, ExaMetadata, JARs, JVM options, adapters, Lua libraries

    • Trigger phrases: Java UDF, ExaIterator, ExaMetadata, getString, %jar, JVM options, script imports, ADAPTER script, remote debugging, Lua context
    • Load: references/udf-java-lua.md
  4. Build or deploy a Script Language Container — flavors, packages, activation, troubleshooting

    • Trigger phrases: SLC, Script Language Container, exaslct, exaslpm, packages.yml, custom packages, flavor, conda, CUDA, GPU UDF, SCRIPT_LANGUAGES, ALTER SESSION, ALTER SYSTEM, security-scan
    • Load: references/slc-reference.md
  5. Orchestrate SQL from inside the database — not a UDF

    • Trigger phrases: execute script, Lua execute, pquery, in-database orchestration, iterative algorithm, multi-step SQL workflow
    • Load: references/lua-execute-scripts.md

Route 5 is a genuine fork, not a variant of the others: use a Lua execute script rather than a UDF when the task is to orchestrate multi-step or iterative SQL workflows from within the database.

Performance Notes

  • Load once, use many: load models and other resources at module level, outside the row loop.
  • Use SET for batching: collect rows into a list or DataFrame and process in bulk.
  • Lua for low latency: avoids JVM and Python startup overhead entirely.
  • Parallelism is automatic: UDFs run on all cluster nodes simultaneously.
  • GPU work needs a CUDA SLC: the UDF API is unchanged, but the container and host driver are not — see references/slc-reference.md.

Related Skills

  • exasol-bucketfs: uploading the JARs, models, and containers that UDFs read.
  • exasol-distributed-ml: end-to-end distributed training and inference pipelines built on these UDFs.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

exasol

Free

Top-level router for Exasol work. Use for any Exasol database, exapump, SQL, BucketFS, extension, integration, UDF, Script Language Container, or Exasol Personal setup task, then route to the narrowest specialized Exasol skill.

The English summary is being prepared. Showing the original description.

exasol-labs/exasol-agent-skills10Updated Oct 14, 2026

Exasol BucketFS file system management via the `exapump bucketfs` CLI. Covers listing, uploading, downloading, and deleting files and directories in BucketFS, the `bfsdefault` service and other bucket services, bucket structure, `bfs_*` profile settings, the `/buckets/<service>/<bucket>/<path>` UDF path, and staging JARs, models, and Script Language Containers for UDFs.

The English summary is being prepared. Showing the original description.

exasol-labs/exasol-agent-skills10Updated Oct 14, 2026

Use Exasol Cloud Storage Extension workflows for moving structured object-storage files through extension UDFs. Covers setup prerequisites, the fixed `CLOUD_STORAGE_EXTENSION.IMPORT_PATH` and `CLOUD_STORAGE_EXTENSION.EXPORT_PATH` entrypoints used with `FROM SCRIPT` and `INTO SCRIPT`, Parquet, Avro, ORC, and Delta files on S3, Google Cloud Storage, Azure Blob Storage, Azure Data Lake, HDFS, and Alluxio, connection-object credential patterns, and routing away from native IMPORT or EXPORT when the extension path is the right fit.

The English summary is being prepared. Showing the original description.

exasol-labs/exasol-agent-skills10Updated Oct 14, 2026

Exasol database interaction via the exapump CLI and Exasol SQL. Covers SQL queries and DML/DDL such as `SELECT`, `INSERT`, `UPDATE`, `DELETE`, `MERGE`, `CREATE TABLE`, `ALTER TABLE`, and `DROP TABLE`, `CREATE CONNECTION` connection objects without import or export intent, schema inspection, table design, `exapump sql` and `exapump profile`, query profiling, analytics, and Exasol-specific SQL behavior outside exasol-import and exasol-export.

The English summary is being prepared. Showing the original description.

exasol-labs/exasol-agent-skills10Updated Oct 14, 2026

Distributed machine learning, data mining, and iterative HPC with Exasol. Covers end-to-end ML pipelines (DISTRIBUTE BY + SET scripts + BucketFS), per-entity federated training with partial_fit and ctx.reset(), batch inference, map-reduce ensemble training, distributed ensemble and SON algorithm for frequent itemset mining (Apriori, FP-Growth, association rules, market-basket analysis), Lua execute script orchestration for iterative algorithms (k-means, SGD, gradient descent), scikit-learn model training, parallel hyperparameter search, per-entity forecasting, anomaly detection, model lifecycle in BucketFS (pickle/joblib/ONNX versioning), GPU acceleration via CUDA SLCs (PyTorch/TensorFlow/RAPIDS), and ML-specific performance tuning (skew, OOM, multi-pass chunking).

The English summary is being prepared. Showing the original description.

exasol-labs/exasol-agent-skills10Updated Oct 14, 2026

Use Exasol document-file virtual schemas for federated read-only access to object and file storage — S3, Google Cloud Storage, Azure Blob Storage, and Azure Data Lake Storage Gen2 document files. Covers document-file adapter family selection, the EDML `MAPPING` definition, `CREATE VIRTUAL SCHEMA` usage, refresh workflows, and query-side troubleshooting.

The English summary is being prepared. Showing the original description.

exasol-labs/exasol-agent-skills10Updated Oct 14, 2026

See all skills by exasol-labs

Report a problem with this skill