pipeline.drop
drop_resources
def drop_resources(
schema: Schema,
state: TPipelineState,
resources: Union[Iterable[Union[str, TSimpleRegex]],
Union[str, TSimpleRegex]] = (),
state_paths: jsonpath.TAnyJsonPath = (),
drop_all: bool = False,
state_only: bool = False,
sources: Optional[Union[Iterable[Union[str, TSimpleRegex]],
Union[str, TSimpleRegex]]] = None
) -> _DropResult
Generate a new schema and pipeline state with the requested resources removed.
Arguments:
schema
- The schema to modify. Note that schema is changed in place.state
- The pipeline state to modify. Note that state is changed in place.resources
- Resource name(s) or regex pattern(s) matching resource names to drop. If empty, no resources will be dropped unlessdrop_all
is True.state_paths
- JSON path(s) relative to the source state to drop.drop_all
- If True, all resources will be dropped (supersedesresources
).state_only
- If True, only modify the pipeline state, not schemasources
- Only wipe state for sources matching the name(s) or regex pattern(s) in this list If not set all source states will be modified according tostate_paths
andresources
Returns:
A 3 part tuple containing the new schema, the new pipeline state, and a dictionary containing information about the drop operation.