Skip to main content
Version: 1.30.0 (latest)

dlt.common.storages.load_storage

LoadItemStorage Objects​

class LoadItemStorage(DataItemStorage)

View source on GitHub

__init__​

def __init__(package_storage: PackageStorage,
writer_spec: FileWriterSpec) -> None

View source on GitHub

Data item storage using storage to manage load packages

LoadStorage Objects​

class LoadStorage(VersionedStorage)

View source on GitHub

NORMALIZED_FOLDER​

folder within the volume where load packages are stored

LOADED_FOLDER​

folder to keep the loads that were completely processed

NEW_PACKAGES_FOLDER​

folder where new packages are created

list_new_jobs​

def list_new_jobs(load_id: str) -> Sequence[str]

View source on GitHub

Lists all jobs in new jobs folder of normalized package storage and checks if file formats are supported

list_normalized_packages​

def list_normalized_packages() -> Sequence[str]

View source on GitHub

Lists all packages that are normalized and will be loaded or are currently loaded

list_loaded_packages​

def list_loaded_packages() -> Sequence[str]

View source on GitHub

List packages that are completely loaded

list_failed_jobs_in_loaded_package​

def list_failed_jobs_in_loaded_package(load_id: str) -> Sequence[LoadJobInfo]

View source on GitHub

List all failed jobs and associated error messages for a completed load package with load_id

commit_schema_update​

def commit_schema_update(load_id: str, applied_update: TSchemaTables) -> None

View source on GitHub

Marks schema update as processed by removing schema update file and saving the applied (effective) updates as reported by destination

import_new_job​

def import_new_job(load_id: str,
job_file_path: str,
job_state: TPackageJobState = "new_jobs") -> None

View source on GitHub

Adds new job by moving the job_file_path into new_jobs of package load_id

maybe_remove_completed_jobs​

def maybe_remove_completed_jobs(load_id: str) -> None

View source on GitHub

Deletes completed jobs if delete_completed_jobs config flag is set. If package has failed jobs, nothing gets deleted.

get_package_storage​

def get_package_storage(load_id: str) -> PackageStorage

View source on GitHub

Returns the loaded or normalized package storage that holds load_id.

get_load_package_info​

def get_load_package_info(load_id: str) -> LoadPackageInfo

View source on GitHub

Gets information on normalized OR loaded package with given load_id, all jobs and their statuses.

get_load_package_state​

def get_load_package_state(load_id: str) -> TLoadPackageState

View source on GitHub

Gets state of normalized or loaded package with given load_id, all jobs and their statuses.

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.