examples

command
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 16, 2026 License: 0BSD Imports: 20 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Recipes

Small, complete workers, one per pattern. Each runs on its own and is tested by examples/test/recipes.test (make test-sql). Copy the pattern you need into the main worker.

Recipe Pattern Try it
transform_rows table in-out: transform the rows of a query SELECT * FROM transform_rows.main.positive_only((SELECT * FROM t))
aggregate aggregate with per-group state SELECT k, aggregate.main.int_sum(v) FROM t GROUP BY k
pushdown_sqlite filter + projection pushdown into a database SELECT id FROM pushdown_sqlite.main.orders() WHERE region = 'west'
cache_expensive_call let DuckDB cache a slow result (TTL + ETag) SELECT * FROM cache_expensive_call.main.exchange_rates()
catalog_tables a dataset queried by name, with a primary key SELECT * FROM catalog_tables.main.countries
copy_to_sink COPY … TO with a custom output format COPY t TO 'out.jsonl' (FORMAT 'copy_to_sink.jsonl_out')

Streaming large results and calling REST APIs are covered by the main worker's sequence_table and fetch_items.

Running a recipe

ATTACH 'aggregate' (TYPE vgi, LOCATION '/abs/path/bin/recipes aggregate');

make build also builds bin/recipes; bin/recipes <recipe> serves one recipe. All recipes live in examples/ as one package main, and import only the SDK, Arrow, and (for pushdown_sqlite) the pure-Go modernc.org/sqlite the SDK already depends on.

The recipes are deliberately small and skip the full metadata the main worker carries. Add it when you move a pattern into your worker.

Documentation

Overview

Command recipes runs one recipe as a worker: recipes <recipe> [worker flags].

ATTACH 'aggregate' (TYPE vgi, LOCATION '/abs/bin/recipes aggregate');

Each recipe is one file in this directory and builds its own *vgi.Worker. The recipes are deliberately small and skip the full metadata the main worker carries.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL