Skip to Content
New EngineExtensionsCustom Extensions
Experimental: Contact Us

This surface is directional and may change before public release. Contact Spiral if you want to use it in an early workflow.

A custom Extension should expose a small, documented user surface:

  • One or more table functions.
  • Output schemas with stable field names.
  • Optional scalar or aggregate functions.
  • Optional materializers for previews, tensors, artifacts, or batch streams.
  • Configuration keys and credentials.

At SQL level, an Extension usually appears as table functions:

SELECT * FROM myextension.scan('s3://bucket/path/', option => 'value');

The current binder supports positional and named table-function arguments. Each extension function should document its accepted parameter names and which arguments must be literals for schema discovery.

Documentation checklist

Every custom extension should document:

SectionRequired content
InstallationPackage name, version constraints, and activation steps.
Table functionsFunction ids, parameters, examples, and output schema.
TypesDeferred reference types and materialized value types.
ConfigurationCredentials, cache paths, object-store settings, and defaults.
PerformancePushdown behavior, decode behavior, caching, and memory notes.
LimitsUnsupported formats, size limits, and stability status.

Function ids

Use a stable namespace:

myextension.scan myextension.metadata myextension.decode

Avoid short global names that can collide with other packages.

Output schema

Prefer explicit metadata columns and a deferred reference column:

ColumnPurpose
<domain>_idStable id for joins and reproducibility.
path or uriSource location when useful to users.
metadata columnsFilterable attributes.
<domain>_refDeferred value reference.

Materialization

Do not hide expensive work inside discovery table functions. Discovery should return metadata and references. Separate materializers should document when bytes are read, decoded, transformed, cached, or copied to a device.

For implementation details, keep design notes in internal developer documentation or the extension repository, not in the user docs.

Last updated on