Skip to content

Operators and bindings

Declarative analytical work and its data and execution requirements.

Operator dataclass

Declare an operator with a compute binding and an optional merge.

Parameters:

Name Type Description Default
id str | None

Optional non-empty identifier, unique within its profile. When omitted, the ID is generated from the primary function and outputs. An operator referenced as a profile's seed must have an explicitly supplied ID.

None
inputs Sequence[Feature | Reference | str] | None

Feature dependencies. Inputs are inferred from binding arguments when omitted.

None
outputs Sequence[Feature] | None

Explicit feature declarations produced by the operator. When omitted, output references in the compute and merge bindings are used.

None
row_context RowContext | RowContextBinding[Any] | None

Operator-specific observation requirements, merged with argument annotations.

None
compute Bind

Function accepting zero or one dataframe. A dataframe result is the complete target without a merge, or a fragment with a merge. Non-dataframe results are not added to the target.

required
merge Bind | None

Function combining the compute fragment with the target.

None

id instance-attribute

id: str

inputs instance-attribute

inputs: list[Feature | Reference | str] | None

outputs instance-attribute

outputs: list[Feature] | None

row_context class-attribute instance-attribute

row_context: RowContext | RowContextBinding[Any] | None = None

compute instance-attribute

compute: Bind

merge class-attribute instance-attribute

merge: Bind | None = None

output_ids property

output_ids: list[str]

Return explicit or inferred output feature IDs in order.

input_ids property

input_ids: list[str]

Return explicit or inferred input feature IDs in order.

reference property

reference: FunctionReference

Return the normalized entrypoint without importing string references.

catalog_id property

catalog_id: str

Return the function-derived catalog identifier.

bound_arguments

bound_arguments() -> dict[str, typing.Any]

Return a copy of arguments, validating names for in-process callables.

Entrypoint strings are not imported during authoring; signature validation for those functions is deferred until compilation.

to_model

to_model() -> spec_model.Operator

Convert this declaration to its canonical document model.

function_catalog

function_catalog() -> spec_model.FunctionCatalog

Build the reusable function contract declared by this operator.

Bind dataclass

Declare an implementation and its named arguments.

function instance-attribute

function: _Function

arguments instance-attribute

arguments: dict[str, Any]

reference property

reference: FunctionReference

Return the normalized entrypoint without importing string references.

bound_arguments

bound_arguments() -> dict[str, typing.Any]

Copy arguments after validating signatures of in-process callables.

Entrypoint strings and references are not imported during authoring. Implementation signature validation is deferred to binding inspection.

to_model

to_model() -> spec_model.Binding

Convert this binding to the canonical document model.

to_function_template

to_function_template(*, row_context: RowContext | None = None) -> spec_model.FunctionTemplate

Build a reusable contract without operator-specific classifications.