DatabaseDimensionCombination

class lsst.daf.butler.DatabaseDimensionCombination(name: str, *, required: NamedValueAbstractSet[Dimension], implied: NamedValueAbstractSet[Dimension], metadata_columns: NamedValueAbstractSet[IntColumnSpec | StringColumnSpec | FloatColumnSpec | HashColumnSpec | BoolColumnSpec], is_cached: bool, always_join: bool, populated_by: Dimension | None, doc: str)

Bases: DimensionCombination, DatabaseDimensionElement

A combination class that maps directly to a database table or query.

Parameters:
namestr

Name of the dimension.

requiredNamedValueAbstractSet [ Dimension ]

Dimensions whose keys define the compound primary key for this combinations’s (logical) table, as well as references to their own tables.

impliedNamedValueAbstractSet [ Dimension ]

Dimensions whose keys are included in this combinations’s (logical) table as foreign keys.

metadata_columnsNamedValueAbstractSet [ MetadataColumnSpec ]

Field specifications for all non-key fields in this combination’s table.

is_cachedbool

Whether this element’s records should be persistently cached in the client.

always_joinbool, optional

If True, always include this element in any query or data ID in which its required dimensions appear, because it defines a relationship between those dimensions that must always be satisfied.

populated_byDimension or None

The dimension that this element’s records are always inserted, exported, and imported alongside.

docstr

Extended description of this element.

Notes

DatabaseDimensionCombination objects may belong to a TopologicalFamily, but it is the responsibility of DatabaseTopologicalFamilyConstructionVisitor to update the topology attribute of their members.

This class has a lot in common with DatabaseDimension, but they are expected to diverge in future changes, and the only way to make them share method implementations would be via multiple inheritance. Given the trivial nature of all of those implementations, this does not seem worth the drawbacks (particularly the constraints it imposes on constructor signatures).

Attributes Summary

alwaysJoin

Indicate if the element should always be included.

defines_relationships

Whether this element's records define one or more relationships that must be satisfied in rows over dimensions that include it.

populated_by

The dimension that this element's records are always inserted, exported, and imported alongside.

required

Return the required dimensions.

Attributes Documentation

alwaysJoin
defines_relationships
populated_by
required