Skip to content

Binding models

Function bindings and aggregate views of their bound arguments.

Binding

Bases: StrictModel

Wire a catalog function to its named argument values.

function instance-attribute

function: str

args class-attribute instance-attribute

args: dict[str, BindingArgument] = pydantic.Field(default_factory=dict)

inferred_feature_outputs class-attribute instance-attribute

inferred_feature_outputs: tuple[str, ...] = pydantic.Field(default=(), exclude=True)

metadata_references_with_paths cached property

metadata_references_with_paths: tuple[tuple[BindingArgument, ArgumentPath], ...]

Return metadata selectors and binding-relative paths.

grain_references_with_paths cached property

grain_references_with_paths: tuple[tuple[BindingArgument, ArgumentPath], ...]

Return profile grain selectors and their binding-relative paths.

feature_references property

feature_references: tuple[str, ...]

Return feature reference IDs in order, retaining duplicates and current markers.

uses_current_feature property

uses_current_feature: bool

Whether any nested reference uses the current output feature marker.

references_with_paths cached property

references_with_paths: tuple[tuple[BindingArgument, ArgumentPath], ...]

Return structural argument references with binding-relative paths.

values_with_paths cached property

values_with_paths: tuple[tuple[object, ArgumentPath], ...]

Return nested argument leaves and their binding-relative paths.

references_by_prefix cached property

references_by_prefix: dict[str, tuple[tuple[str, ArgumentPath], ...]]

Group nested reference IDs by resource prefix.

profile_dataframe_references cached property

profile_dataframe_references: tuple[str, ...]

Return ordered profile data references from all arguments.

inferred_feature_inputs property

inferred_feature_inputs: tuple[str, ...]

Return ordered unique feature inputs inferred by the arguments.

argument_mismatches

argument_mismatches(function: FunctionTemplate) -> tuple[set[str], set[str]]

Return missing and unknown argument names for a function declaration.

typed_arguments

typed_arguments(function: FunctionTemplate) -> typing.Iterator[tuple[binding_argument.BindingArgument, str]]

Yield bound leaves with declared types, skipping undeclared arguments.

profile_dependencies

profile_dependencies(current_profile_id: str) -> list[str]

Aggregate unique inferred profile-data dependencies.

resolve_args

resolve_args(profile_id: str, feature_id: str | None = None, identifiers_by_profile: Mapping[str, Sequence[str]] | None = None, resources: BindingResources | None = None, *, row_context: RowContext | None = None) -> dict[str, object]

Resolve all arguments with a shared invocation context.