DimensionRecordSchema

class lsst.daf.butler.DimensionRecordSchema(element: DimensionElement)

Bases: object

A description of the columns in a dimension element’s records.

Instances of this class should be obtained via DimensionElement.schema, where they are cached on first use.

Parameters:
elementDimensionElement

Element this object describes.

Attributes Summary

names

The names of all columns, in order.

Methods Summary

to_arrow([remainder_only, dimensions])

Convert this schema to Arrow form.

Attributes Documentation

names

The names of all columns, in order.

Methods Documentation

to_arrow(remainder_only: bool = False, dimensions: DimensionGroup | None = None) list[arrow_utils.ToArrow]

Convert this schema to Arrow form.

Parameters:
remainder_onlybool, optional

If True, skip the fields in dimensions and convert only those in remainder.

dimensionsDimensionGroup, optional

Full set of dimensions over which the rows of the table are unique or close to unique. This is used to determine whether to use Arrow’s dictionary encoding to compress duplicate values. Defaults to this element’s minimal_group, which is appropriate for tables of just the records of this element.

Returns:
converterslist [ arrow_utils.ToArrow ]

List of objects that can convert DimensionRecord attribute values to Arrow records, corresponding exactly to either all or remainder, depending on remainder_only.