lsst.dax.apdb 22.0.1-6-gdd19981+53ffec75fc
|
Public Member Functions | |
def | __init__ (self, cassandra.cluster.Session session, str schema_file, Optional[str] extra_schema_file=None, str prefix="", str packing="none", bool time_partition_tables=False) |
str | tableName (self, ApdbTables table_name) |
Mapping[str, ColumnDef] | getColumnMap (self, ApdbTables table_name) |
List[str] | partitionColumns (self, ApdbTables table_name) |
List[str] | clusteringColumns (self, ApdbTables table_name) |
None | makeSchema (self, bool drop=False, Optional[Tuple[int, int]] part_range=None) |
List[ColumnDef] | packedColumns (self, ApdbTables table_name) |
Additional Inherited Members | |
![]() | |
tableSchemas | |
Class for management of APDB schema. Parameters ---------- session : `cassandra.cluster.Session` Cassandra session object schema_file : `str` Name of the YAML schema file. extra_schema_file : `str`, optional Name of the YAML schema file with extra column definitions. prefix : `str`, optional Prefix to add to all schema elements. packing : `str` Type of packing to apply to columns, string "none" disable packing, any other value enables it. time_partition_tables : `bool` If True then schema will have a separate table for each time partition.
def lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.__init__ | ( | self, | |
cassandra.cluster.Session | session, | ||
str | schema_file, | ||
Optional[str] | extra_schema_file = None , |
||
str | prefix = "" , |
||
str | packing = "none" , |
||
bool | time_partition_tables = False |
||
) |
Reimplemented from lsst.dax.apdb.apdbSchema.ApdbSchema.
List[str] lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.clusteringColumns | ( | self, | |
ApdbTables | table_name | ||
) |
Return a list of columns used for clustering. Parameters ---------- table_name : `ApdbTables` Table name in APDB schema Returns ------- columns : `list` of `str` Names of columns for used for partitioning.
Mapping[str, ColumnDef] lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.getColumnMap | ( | self, | |
ApdbTables | table_name | ||
) |
Returns mapping of column names to Column definitions. Parameters ---------- table_name : `ApdbTables` One of known APDB table names. Returns ------- column_map : `dict` Mapping of column names to `ColumnDef` instances.
None lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.makeSchema | ( | self, | |
bool | drop = False , |
||
Optional[Tuple[int, int]] | part_range = None |
||
) |
Create or re-create all tables. Parameters ---------- drop : `bool` If True then drop tables before creating new ones. part_range : `tuple` [ `int` ] or `None` Start and end partition number for time partitions, end is not inclusive. Used to create per-partition DiaObject, DiaSource, and DiaForcedSource tables. If `None` then per-partition tables are not created.
List[ColumnDef] lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.packedColumns | ( | self, | |
ApdbTables | table_name | ||
) |
Return set of columns that are packed into BLOB. Parameters ---------- table_name : `ApdbTables` Name of the table. Returns ------- columns : `list` [ `ColumnDef` ] List of column definitions. Empty list is returned if packing is not configured.
List[str] lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.partitionColumns | ( | self, | |
ApdbTables | table_name | ||
) |
Return a list of columns used for table partitioning. Parameters ---------- table_name : `ApdbTables` Table name in APDB schema Returns ------- columns : `list` of `str` Names of columns for used for partitioning.
str lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.tableName | ( | self, | |
ApdbTables | table_name | ||
) |
Return Cassandra table name for APDB table.