Skip to content

Worker access functions in the VGI DuckDB extension

Function category

Worker access

3 functions

Reach a VGI worker directly — discover the catalogs it advertises and run its table functions or table scans — without `ATTACH`ing it as a database.

vgi_catalogs

Table function Worker access
Signature
vgi_catalogs(worker_path: VARCHAR) None
Arguments (Positional)
Argument worker_path Type VARCHAR Mode Positional Description
Returns

A table with the following columns:

Column catalog Type VARCHAR Description Name of the catalog as the worker advertises it.
Column implementation_version Type VARCHAR Description Version string of the worker implementation serving this catalog.
Column data_version_spec Type VARCHAR Description Data-version specifier the worker reports for this catalog.
Column attach_options Type STRUCT[] Description Options the catalog accepts on ATTACH. Each entry has name, description, type, and default_value.
Column releases Type STRUCT[] Description Release history the worker advertises. Each entry has version, released_at, summary, and notes_url.
Column source_url Type VARCHAR Description URL of the worker's source or documentation, if provided.
Description
1 Example 1
SELECT * FROM vgi_catalogs('./worker');

vgi_table_function

Table function Worker access
Signature
2 overloaded forms · click to inspect
Arguments (Positional)
Argument worker_path Type VARCHAR Mode Positional Description
Argument function_name Type VARCHAR Mode Positional Description
Argument positional_args Type ANY[] Mode Positional Description
Returns

Dynamic schema. The output columns are determined at bind time and vary per call, so they aren't listed here.

Description
1 Call a worker function with positional arguments
SELECT * FROM vgi_table_function('./worker', 'projected_data', [10]);
2 Pass an options struct (quote reserved field names)
SELECT * FROM vgi_table_function('./worker', 'projected_data', [10], {'limit': 5});

vgi_table_scan

Table function Worker access
Signature
vgi_table_scan() None
Returns

Dynamic schema. The output columns are determined at bind time and vary per call, so they aren't listed here.

Description