Skip to main content
Version: 1.5.0 (latest)

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

[view_source]

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 unless drop_all is True.
  • state_paths - JSON path(s) relative to the source state to drop.
  • drop_all - If True, all resources will be dropped (supersedes resources).
  • state_only - If True, only modify the pipeline state, not schema
  • sources - 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 to state_paths and resources

Returns:

A 3 part tuple containing the new schema, the new pipeline state, and a dictionary containing information about the drop operation.

This demo works on codespaces. Codespaces is a development environment available for free to anyone with a Github account. You'll be asked to fork the demo repository and from there the README guides you with further steps.
The demo uses the Continue VSCode extension.

Off to codespaces!

DHelp

Ask a question

Welcome to "Codex Central", your next-gen help center, driven by OpenAI's GPT-4 model. It's more than just a forum or a FAQ hub – it's a dynamic knowledge base where coders can find AI-assisted solutions to their pressing problems. With GPT-4's powerful comprehension and predictive abilities, Codex Central provides instantaneous issue resolution, insightful debugging, and personalized guidance. Get your code running smoothly with the unparalleled support at Codex Central - coding help reimagined with AI prowess.