DatasetRefReader¶
- class lsst.daf.butler.registry.queries.DatasetRefReader(dataset_type: DatasetType, *, full: bool = True, translate_collection: Callable[[Any], str] | None = None, records: bool = False, record_caches: Mapping[str, DimensionRecordSet] | None = None)¶
- Bases: - object- Reader class that extracts - DatasetRefobjects from query result rows.- Parameters:
- dataset_typeDatasetType
- Dataset type for extracted references. 
- fullbool, optional
- Whether to expect and extract implied dimensions as well as required dimensions. 
- translate_collectionCallable, optional
- Callable that returns - strcollection names given collection primary key values. Optional only for registries that use names as primary keys, or if- runis always passed to- read.
- recordsbool, optional
- Whether to attach dimension records to data IDs. 
- record_cachesMapping, optional
- Nested mapping (outer keys are dimension element names, inner keys are data IDs for that element) of cached dimension records. Ignored unless - records=True.
 
- dataset_type
 - Attributes Summary - Methods Summary - read(row, *[, run, data_id])- Read a - DatasetReffrom a query result row.- Attributes Documentation - columns_required¶
 - Methods Documentation - read(row: Mapping[ColumnTag, Any], *, run: str | None = None, data_id: DataCoordinate | None = None) DatasetRef¶
- Read a - DatasetReffrom a query result row.- Parameters:
- rowMapping
- Mapping with - ColumnTagkeys representing a query result row.
- runstr, optional
- Name of the - RUNcollection; when provided the run key does not need to be present in the result row, and- translate_collectiondoes not need to be provided at construction.
- data_idDataCoordinate, optional
- Data ID; when provided the dimensions do not need to be present in the result row. 
 
- row