DatastoreRecordData¶
-
class
lsst.daf.butler.DatastoreRecordData(records: defaultdict[DatasetId, defaultdict[str, List[StoredDatastoreItemInfo]]] = <factory>)¶ Bases:
objectA struct that represents a tabular data export from a single datastore.
Methods Summary
from_simple(simple, universe, registry)Make an instance of this class from serialized data. subset(dataset_ids, uuid.UUID]])Extract a subset of the records that match given dataset IDs. to_simple(minimal)Make representation of the object for serialization. update(other)Update contents of this instance with data from another instance. Methods Documentation
-
classmethod
from_simple(simple: SerializedDatastoreRecordData, universe: Optional[DimensionUniverse] = None, registry: Optional[Registry] = None) → DatastoreRecordData¶ Make an instance of this class from serialized data.
Implements
SupportsSimpleprotocol.Parameters: - data :
dict Serialized representation returned from
to_simplemethod.- universe :
DimensionUniverse, optional Dimension universe, not used by this method.
- registry :
Registry, optional Registry instance, not used by this method.
Returns: - item_info :
StoredDatastoreItemInfo De-serialized instance of
StoredDatastoreItemInfo.
- data :
-
subset(dataset_ids: AbstractSet[Union[int, uuid.UUID]]) → Optional[lsst.daf.butler.core.datastoreRecordData.DatastoreRecordData]¶ Extract a subset of the records that match given dataset IDs.
Parameters: - dataset_ids :
set[DatasetId] Dataset IDs to match.
Returns: - record_data :
DatastoreRecordDataorNone Noneis returned if there are no matching refs.
Notes
Records in the returned instance are shared with this instance, clients should not update or extend records in the returned instance.
- dataset_ids :
-
to_simple(minimal: bool = False) → lsst.daf.butler.core.datastoreRecordData.SerializedDatastoreRecordData¶ Make representation of the object for serialization.
Implements
SupportsSimpleprotocol.Parameters: - minimal :
bool, optional If True produce minimal representation, not used by this method.
Returns: - simple :
dict Representation of this instance as a simple dictionary.
- minimal :
-
update(other: lsst.daf.butler.core.datastoreRecordData.DatastoreRecordData) → None¶ Update contents of this instance with data from another instance.
Parameters: - other :
DatastoreRecordData Records tho merge into this instance.
Notes
Merged instances can not have identical records.
- other :
-
classmethod