RepoImportBackend

class lsst.daf.butler.RepoImportBackend

Bases: abc.ABC

An abstract interface for data repository import implementations.

Import backends are expected to be constructed with a description of the objects that need to be imported (from, e.g., a file written by the corresponding export backend), along with a Registry.

Methods Summary

load(datastore, *, directory, transfer) Import information associated with the backend into the given registry and datastore.
register() Register all runs and dataset types associated with the backend with the Registry the backend was constructed with.

Methods Documentation

load(datastore: Datastore, *, directory: Optional[str] = None, transfer: Optional[str] = None)

Import information associated with the backend into the given registry and datastore.

This must be run after register, and may be performed inside a transaction.

Parameters:
registry : Registry

Registry to import into.

datastore : Datastore

Datastore to import into.

directory : str, optional

File all dataset paths are relative to.

transfer : str, optional

Transfer mode forwarded to Datastore.ingest.

register()

Register all runs and dataset types associated with the backend with the Registry the backend was constructed with.

These operations cannot be performed inside transactions, unlike those performed by load, and must in general be performed before load.