DataCoordinateReader¶
- class lsst.daf.butler.registry.queries.DataCoordinateReader¶
Bases:
ABC
Base class and factory for reader objects that extract
DataCoordinate
instances from query result rows.Attributes Summary
Methods Summary
make
(dimensions[, full, records, record_caches])Construct a concrete reader for a set of dimensions.
read
(row)Read a
DataCoordinate
from a query result row.Attributes Documentation
- columns_required¶
Methods Documentation
- static make(dimensions: DimensionGroup, full: bool = True, records: bool = False, record_caches: Mapping[DimensionElement, Mapping[DataCoordinate, DimensionRecord]] | None = None) DataCoordinateReader ¶
Construct a concrete reader for a set of dimensions.
- Parameters:
- dimensions
DimensionGroup
Dimensions of the
DataCoordinate
instances the new reader will read.- full
bool
, optional Whether to expect and extract implied dimensions as well as required dimensions.
- records
bool
, optional Whether to attach dimension records.
- record_caches
Mapping
, optional Nested mapping (outer keys are dimension elements, inner keys are data IDs for that element) of cached dimension records. Ignored unless
records=True
.
- dimensions
- Returns:
- reader
DataCoordinateReader
Concrete reader instance.
- reader
- abstract read(row: Mapping[ColumnTag, Any]) DataCoordinate ¶
Read a
DataCoordinate
from a query result row.- Parameters:
- row
Mapping
Mapping with
ColumnTag
keys representing a query result row.
- row
- Returns:
- data_coordinate
DataCoordinate
New data ID.
- data_coordinate