DimensionJoin¶
-
class
lsst.daf.butler.
DimensionJoin
(universe, name, config)¶ Bases:
lsst.daf.butler.DimensionElement
A join that relates two or more
Dimension
s.DimensionJoin
s usually map to many-to-many join tables or views that relateDimension
tables.DimensionJoin
objects are not directly constructable; they can only be obtained from aDimensionGraph
.Attributes Summary
doc
Documentation for this dimension ( str
).hasRegion
Whether this dimension is associated with a region on the sky ( bool
).lhs
The Dimension
s on the left hand side of the join (DimensionSet
).link
Primary key fields that are used only by this dimension, not any dependencies ( frozenset
ofstr
).name
Name of this dimension ( str
, read-only).primaryKey
The names of fields that uniquely identify this dimension in a data ID dict ( frozenset
ofstr
).rhs
The Dimension
s on the right hand side of the join (DimensionSet
).summarizes
A set of other DimensionJoin
s that provide more fine-grained relationships than this one (DimensionJoinSet
).universe
The graph of all dimensions compatible with self ( DimensionGraph
).Methods Summary
dependencies
([required, optional])Return the set of dimensions this dimension depends on. graph
([optional])Return the minimal DimensionGraph
that containsself
.Attributes Documentation
-
lhs
¶ The
Dimension
s on the left hand side of the join (DimensionSet
).Left vs. right is completely arbitrary; the terminology simply provides an easy way to distinguish between the two sides.
-
link
¶ Primary key fields that are used only by this dimension, not any dependencies (
frozenset
ofstr
).
-
name
¶ Name of this dimension (
str
, read-only).Also assumed to be the name of any associated table or view.
-
primaryKey
¶ The names of fields that uniquely identify this dimension in a data ID dict (
frozenset
ofstr
).
-
rhs
¶ The
Dimension
s on the right hand side of the join (DimensionSet
).Left vs. right is completely arbitrary; the terminology simply provides an easy way to distinguish between the two sides.
-
summarizes
¶ A set of other
DimensionJoin
s that provide more fine-grained relationships than this one (DimensionJoinSet
).When a join “summarizes” another, it means the table for that join could (at least conceptually) be defined as an aggregate view on the summarized join table. For example, “TractSkyPixJoin” summarizes “PatchSkyPixJoin”, because the set of SkyPix rows associated with a Tract row is just the set of SkyPix rows associated with all Patches associated with that Tract. Or, in SQL:
CREATE VIEW TractSkyPixJoin AS SELECT DISTINCT skymap, tract, skypix FROM PatchSkyPixJoin;
-
universe
¶ The graph of all dimensions compatible with self (
DimensionGraph
).
Methods Documentation
-
dependencies
(required=True, optional=False)¶ Return the set of dimensions this dimension depends on.
Parameters: Returns: - dependencies :
DimensionSet
- dependencies :
-
graph
(optional=False)¶ Return the minimal
DimensionGraph
that containsself
.Parameters: Returns: - graph :
DimensionGraph
- graph :
-