Skip to main content
Version: devel

dlt.pipeline.abort

TAbortPackageInfo Objects

class TAbortPackageInfo(TypedDict)

View source on GitHub

The single package to be aborted with a record and how its jobs will be processed.

terminal_jobs

retried or failed-in-flight jobs with terminal errors, will be moved to failed_jobs

transient_jobs

retried jobs with transient errors, will be moved to failed_jobs

interrupted_jobs

started jobs without a recorded outcome, will be moved to failed_jobs

committed_jobs

started jobs already committed to the destination, will be moved to completed_jobs

TAbortPlan Objects

class TAbortPlan(TypedDict)

View source on GitHub

Plan of what a pipeline abort will remove and where the local state rewinds to.

package_to_abort

the oldest normalized package (the one being loaded), aborted with a record; None otherwise

restore_from_load_id

oldest package being removed; local state and schemas rewind to its start snapshot

prepare_abort_packages

def prepare_abort_packages(
load_storage: LoadStorage,
normalize_storage: NormalizeStorage,
load_id: Optional[str] = None) -> Optional[TAbortPlan]

View source on GitHub

Plans an abort of packages starting at load_id (the oldest pending when None), or None when nothing is pending. Packages older than load_id are left intact; load_id and everything newer, extracted packages included, are removed and the local state rewinds to load_id's start. The oldest pending normalized package (the one being loaded) is the only one aborted with a record; its jobs are classified the way the loader will process them. load_id may already be aborted (moved to loaded storage) so this planner can drive the post-abort cleanup too.

execute_abort_plan

def execute_abort_plan(
load_storage: LoadStorage, normalize_storage: NormalizeStorage,
plan: TAbortPlan) -> Optional[Tuple[Optional[str], Dict[str, str]]]

View source on GitHub

Deletes the packages the plan marked for deletion and returns the restore snapshot for the caller to install (or None). The snapshot is read before any deletion because the package that carries it may itself be deleted.

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.