ApdbCassandraConfig#
- class lsst.dax.apdb.ApdbCassandraConfig(*, schema_file: str = 'resource://lsst.sdm.schemas/apdb.yaml', ss_schema_file: str = 'resource://lsst.sdm.schemas/sso.yaml', schema_name: str = 'ApdbSchema', read_sources_months: int = 12, read_forced_sources_months: int = 12, enable_replica: bool = False, replica_chunk_seconds: int = 600, contact_points: tuple[str, ...] = ('127.0.0.1', ), keyspace: str = 'apdb', connection_config: ~lsst.dax.apdb.cassandra.config.ApdbCassandraConnectionConfig = <factory>, partitioning: ~lsst.dax.apdb.cassandra.config.ApdbCassandraPartitioningConfig = <factory>, dia_object_columns: list[str] = [], prefix: str = '', ra_dec_columns: tuple[str, str] = ('ra', 'dec'), replica_skips_diaobjects: bool = False, replica_sub_chunk_count: int = 64, batch_statement_limit: int = 65535, batch_size_limit: int = 1000000)#
Bases:
ApdbConfigConfiguration class for Cassandra-based APDB implementation.
Attributes Summary
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].Methods Summary
check_ra_dec(v)Return alias name for dbauth lookup.
Attributes Documentation
- model_config: ClassVar[ConfigDict] = {}#
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
Methods Documentation
- classmethod check_ra_dec(v: Iterable[str]) tuple[str, str]#
- get_dbauth_alias() str#
Return alias name for dbauth lookup.
Returns#
- alias
str Possibly empty alias name.
Notes#
If
connection_config.dbauth_aliasis set then it is returned. Otherwise this method tries to guess whether the instance should be inprodordevcluster based on username and keyspace. It returns “pp_apdb_prod_cluster” or “pp_apdb_dev_cluster” for those two, empty string is returned when it cannot guess.- alias