ApdbCassandraSchema¶
- class lsst.dax.apdb.ApdbCassandraSchema(session: cassandra.cluster.Session, keyspace: str, schema_file: str, schema_name: str = 'ApdbSchema', prefix: str = '', time_partition_tables: bool = False)¶
 Bases:
ApdbSchemaClass for management of APDB schema.
- Parameters:
 - session
cassandra.cluster.Session Cassandra session object
- schema_file
str Name of the YAML schema file.
- schema_name
str, optional Name of the schema in YAML files.
- prefix
str, optional Prefix to add to all schema elements.
- time_partition_tables
bool If True then schema will have a separate table for each time partition.
- session
 
Methods Summary
clusteringColumns(table_name)Return a list of columns used for clustering.
getColumnMap(table_name)Returns mapping of column names to Column definitions.
makeSchema([drop, part_range])Create or re-create all tables.
partitionColumns(table_name)Return a list of columns used for table partitioning.
tableName(table_name)Return Cassandra table name for APDB table.
Methods Documentation
- clusteringColumns(table_name: ApdbTables | ExtraTables) List[str]¶
 Return a list of columns used for clustering.
- Parameters:
 - table_name
ApdbTables Table name in APDB schema
- table_name
 - Returns:
 
- getColumnMap(table_name: ApdbTables | ExtraTables) Mapping[str, ColumnDef]¶
 Returns mapping of column names to Column definitions.
- Parameters:
 - table_name
ApdbTables One of known APDB table names.
- table_name
 - Returns:
 
- makeSchema(drop: bool = False, part_range: Tuple[int, int] | None = None) None¶
 Create or re-create all tables.
- Parameters:
 
- partitionColumns(table_name: ApdbTables | ExtraTables) List[str]¶
 Return a list of columns used for table partitioning.
- Parameters:
 - table_name
ApdbTables Table name in APDB schema
- table_name
 - Returns:
 
- tableName(table_name: ApdbTables | ExtraTables) str¶
 Return Cassandra table name for APDB table.