graflo.architecture.contract.ingestion.routing¶
Which records a resource's routers keep, read off its typed pipeline.
A resource whose top level only transforms, routes and links router roles
produces something from a record only when a vertex_router routes the
record's type_field value. Those values are a condition a source can apply
before it reads (a table connector pushes them into its query), and connector
pruning uses the same rule to decide which requests still reach a class.
Attributes¶
Classes¶
RoutedRecordFilter
¶
Bases: BaseModel
The records a pipeline produces anything from, or why that cannot be said.
fields maps each routed type_field to the values its routers send
somewhere; a record counts when any field holds one of its values. An empty
mapping means no record produces anything. fields is None when a
record may produce something without a router; blocked_by then names
the step that allows it.
Source code in graflo/architecture/contract/ingestion/routing.py
Functions:¶
describe_step(step, index)
¶
A short label for step index of a level, for log lines.
Source code in graflo/architecture/contract/ingestion/routing.py
fields_written_before_routing(level, transforms)
¶
Fields the transforms of one pipeline level may write; None if one cannot say.
Every transform of a level runs before the level's routers, whatever its place in the list, so all of them count.
Source code in graflo/architecture/contract/ingestion/routing.py
routed_record_filter(pipeline, declared, transforms)
¶
The records pipeline produces anything from, as routed values per field.
Holds when every top-level step is a transform, a vertex_router, or an
edge between router roles, and no transform of the level writes a
router's type_field. A transform's writes are resolved the way the
runtime resolves them (:meth:TransformActorConfig.fields_written): a
when guard on the type_field only reads it.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline
|
Sequence[ActorConfig]
|
The resource's top-level steps. |
required |
declared
|
Collection[str]
|
The classes the schema declares. |
required |
transforms
|
Mapping[str, ProtoTransform]
|
|
required |
Source code in graflo/architecture/contract/ingestion/routing.py
routers_keep_subset(pipeline)
¶
Whether a top-level router of pipeline is closed or bounded by vertex_types.