YamlRepoImportBackend¶
-
class
lsst.daf.butler.YamlRepoImportBackend(stream: IO, registry: lsst.daf.butler.registry._registry.Registry)¶ Bases:
lsst.daf.butler.transfers._interfaces.RepoImportBackendA repository import implementation that reads from a YAML file.
Parameters: Methods Summary
load(datastore, None], *, directory, …)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 Registrythe backend was constructed with.Methods Documentation
-
load(datastore: Optional[lsst.daf.butler.core.datastore.Datastore, None], *, directory: Optional[str, None] = None, transfer: Optional[str, None] = None, skip_dimensions: Optional[Set, None] = None, idGenerationMode: lsst.daf.butler.registry.interfaces._datasets.DatasetIdGenEnum = <DatasetIdGenEnum.UNIQUE: 0>, reuseIds: bool = False) → 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: - datastore :
Datastore Datastore to import into. If
None, datasets will only be inserted into theRegistry(primarily intended for tests).- directory :
str, optional File all dataset paths are relative to.
- transfer :
str, optional Transfer mode forwarded to
Datastore.ingest.- skip_dimensions :
set, optional Dimensions that should be skipped and not imported. This can be useful when importing into a registry that already knows about a specific instrument.
- idGenerationMode :
DatasetIdGenEnum, optional Specifies option for generating dataset IDs when IDs are not provided or their type does not match backend type. By default unique IDs are generated for each inserted dataset.
- reuseIds :
bool, optional If
Truethen forces re-use of imported dataset IDs for integer IDs which are normally generated as auto-incremented. This option has no effect on the use of globally-unique IDs which are always re-used (or generated if integer IDs are being imported).
- datastore :
-