Sandbox — LSD is in active testing. All systems operational·payments are test-mode (no real charges).
Overview Use Cases News Docs Tool Store Support Community Get LSD
All docs
Tool· decorator

Tool.load

declares a step that produces a table from nothing, a file, or a source

Python
load(*, dialog=None, outputs=None, graph_outputs=None, source_kinds=None, overrides=None, override_mode="replace")

Returns _StepFactory — call it to build a wired load-step node

Parameters#

name type default description
dialog dict | UINode None a UI spec overriding the auto-generated form; every field name is checked against the parameters at import
outputs list[str] None named output ports — the function returns {"a": Table, …}, selected downstream via step.output("a")
graph_outputs dict None {name: type} read-only scalars set via ctx.set_output(...), shown on the node card and excluded from the cache key
source_kinds tuple None narrows the Source picker to these kinds, e.g. ("file", "sql")
overrides str None make this a drop-in variant of another package's node, e.g. "mim.load"
override_mode str "replace" "replace" wins the overridden identity by default; "coexist" keeps both addable

Example#

Python
@tool.load
def numbers(count: int = 5) -> Table:
    return Table({"n": list(range(count))})

Inject a source reader and narrow the picker:

Python
@tool.load(source_kinds=("file", "sql"))
def load_data(src: Source) -> Table:
    return src.read()

Notes#

A load step takes no Table input ports — it is the source of data, and passing one raises at decoration time. A src: Source parameter injects a reader; a StepContext parameter may be injected for progress/cancel, but a Context parameter is rejected (a step must not read project state the cache can't see). override_mode is "replace" (default) or "coexist".

See also#

API: shape · deliver · source · Source

Guides: Load steps · Parameters vs ports · A file loader

By LSD Team · Last updated Jul 17, 2026 Ask on Discord View as Markdown