LSST Applications  21.0.0-147-g0e635eb1+1acddb5be5,22.0.0+052faf71bd,22.0.0+1ea9a8b2b2,22.0.0+6312710a6c,22.0.0+729191ecac,22.0.0+7589c3a021,22.0.0+9f079a9461,22.0.1-1-g7d6de66+b8044ec9de,22.0.1-1-g87000a6+536b1ee016,22.0.1-1-g8e32f31+6312710a6c,22.0.1-10-gd060f87+016f7cdc03,22.0.1-12-g9c3108e+df145f6f68,22.0.1-16-g314fa6d+c825727ab8,22.0.1-19-g93a5c75+d23f2fb6d8,22.0.1-19-gb93eaa13+aab3ef7709,22.0.1-2-g8ef0a89+b8044ec9de,22.0.1-2-g92698f7+9f079a9461,22.0.1-2-ga9b0f51+052faf71bd,22.0.1-2-gac51dbf+052faf71bd,22.0.1-2-gb66926d+6312710a6c,22.0.1-2-gcb770ba+09e3807989,22.0.1-20-g32debb5+b8044ec9de,22.0.1-23-gc2439a9a+fb0756638e,22.0.1-3-g496fd5d+09117f784f,22.0.1-3-g59f966b+1e6ba2c031,22.0.1-3-g849a1b8+f8b568069f,22.0.1-3-gaaec9c0+c5c846a8b1,22.0.1-32-g5ddfab5d3+60ce4897b0,22.0.1-4-g037fbe1+64e601228d,22.0.1-4-g8623105+b8044ec9de,22.0.1-5-g096abc9+d18c45d440,22.0.1-5-g15c806e+57f5c03693,22.0.1-7-gba73697+57f5c03693,master-g6e05de7fdc+c1283a92b8,master-g72cdda8301+729191ecac,w.2021.39
LSST Data Management Base Package
Public Member Functions | Static Public Attributes | List of all members
lsst.dax.apdb.apdb.ApdbConfig Class Reference
Inheritance diagram for lsst.dax.apdb.apdb.ApdbConfig:

Public Member Functions

def validate (self)
 

Static Public Attributes

 db_url = Field(dtype=str, doc="SQLAlchemy database connection URI")
 
 isolation_level
 
 connection_pool
 
 connection_timeout
 
 sql_echo
 
 dia_object_index
 
 dia_object_nightly
 
 read_sources_months
 
 read_forced_sources_months
 
 dia_object_columns
 
 object_last_replace
 
 schema_file
 
 extra_schema_file
 
 column_map
 
 prefix
 
 explain
 
 timer
 
 diaobject_index_hint
 
 dynamic_sampling_hint
 
 cardinality_hint
 

Detailed Description

Definition at line 136 of file apdb.py.

Member Function Documentation

◆ validate()

def lsst.dax.apdb.apdb.ApdbConfig.validate (   self)

Definition at line 209 of file apdb.py.

209  def validate(self):
210  super().validate()
211  if self.isolation_level == "READ_COMMITTED" and self.db_url.startswith("sqlite"):
212  raise ValueError("Attempting to run Apdb with SQLITE and isolation level 'READ_COMMITTED.' "
213  "Use 'READ_UNCOMMITTED' instead.")
214 
215 

Member Data Documentation

◆ cardinality_hint

lsst.dax.apdb.apdb.ApdbConfig.cardinality_hint
static
Initial value:
= Field(dtype=int,
doc="If non-zero then use cardinality hint",
default=0)

Definition at line 205 of file apdb.py.

◆ column_map

lsst.dax.apdb.apdb.ApdbConfig.column_map
static
Initial value:
= Field(dtype=str,
doc="Location of (YAML) configuration file with column mapping",
default=_data_file_name("apdb-afw-map.yaml"))

Definition at line 186 of file apdb.py.

◆ connection_pool

lsst.dax.apdb.apdb.ApdbConfig.connection_pool
static
Initial value:
= Field(dtype=bool,
doc=("If False then disable SQLAlchemy connection pool. "
"Do not use connection pool when forking."),
default=True)

Definition at line 147 of file apdb.py.

◆ connection_timeout

lsst.dax.apdb.apdb.ApdbConfig.connection_timeout
static
Initial value:
= Field(dtype=float,
doc="Maximum time to wait time for database lock to be released before "
"exiting. Defaults to sqlachemy defaults if not set.",
default=None,
optional=True)

Definition at line 151 of file apdb.py.

◆ db_url

lsst.dax.apdb.apdb.ApdbConfig.db_url = Field(dtype=str, doc="SQLAlchemy database connection URI")
static

Definition at line 138 of file apdb.py.

◆ dia_object_columns

lsst.dax.apdb.apdb.ApdbConfig.dia_object_columns
static
Initial value:
= ListField(dtype=str,
doc="List of columns to read from DiaObject, by default read all columns",
default=[])

Definition at line 174 of file apdb.py.

◆ dia_object_index

lsst.dax.apdb.apdb.ApdbConfig.dia_object_index
static
Initial value:
= ChoiceField(dtype=str,
doc="Indexing mode for DiaObject table",
allowed={'baseline': "Index defined in baseline schema",
'pix_id_iov': "(pixelId, objectId, iovStart) PK",
'last_object_table': "Separate DiaObjectLast table"},
default='baseline')

Definition at line 159 of file apdb.py.

◆ dia_object_nightly

lsst.dax.apdb.apdb.ApdbConfig.dia_object_nightly
static
Initial value:
= Field(dtype=bool,
doc="Use separate nightly table for DiaObject",
default=False)

Definition at line 165 of file apdb.py.

◆ diaobject_index_hint

lsst.dax.apdb.apdb.ApdbConfig.diaobject_index_hint
static
Initial value:
= Field(dtype=str,
doc="Name of the index to use with Oracle index hint",
default=None,
optional=True)

Definition at line 198 of file apdb.py.

◆ dynamic_sampling_hint

lsst.dax.apdb.apdb.ApdbConfig.dynamic_sampling_hint
static
Initial value:
= Field(dtype=int,
doc="If non-zero then use dynamic_sampling hint",
default=0)

Definition at line 202 of file apdb.py.

◆ explain

lsst.dax.apdb.apdb.ApdbConfig.explain
static
Initial value:
= Field(dtype=bool,
doc="If True then run EXPLAIN SQL command on each executed query",
default=False)

Definition at line 192 of file apdb.py.

◆ extra_schema_file

lsst.dax.apdb.apdb.ApdbConfig.extra_schema_file
static
Initial value:
= Field(dtype=str,
doc="Location of (YAML) configuration file with extra schema",
default=_data_file_name("apdb-schema-extra.yaml"))

Definition at line 183 of file apdb.py.

◆ isolation_level

lsst.dax.apdb.apdb.ApdbConfig.isolation_level
static
Initial value:
= ChoiceField(dtype=str,
doc="Transaction isolation level",
allowed={"READ_COMMITTED": "Read committed",
"READ_UNCOMMITTED": "Read uncommitted",
"REPEATABLE_READ": "Repeatable read",
"SERIALIZABLE": "Serializable"},
default="READ_COMMITTED",
optional=True)

Definition at line 139 of file apdb.py.

◆ object_last_replace

lsst.dax.apdb.apdb.ApdbConfig.object_last_replace
static
Initial value:
= Field(dtype=bool,
doc="If True (default) then use \"upsert\" for DiaObjectsLast table",
default=True)

Definition at line 177 of file apdb.py.

◆ prefix

lsst.dax.apdb.apdb.ApdbConfig.prefix
static
Initial value:
= Field(dtype=str,
doc="Prefix to add to table names and index names",
default="")

Definition at line 189 of file apdb.py.

◆ read_forced_sources_months

lsst.dax.apdb.apdb.ApdbConfig.read_forced_sources_months
static
Initial value:
= Field(dtype=int,
doc="Number of months of history to read from DiaForcedSource",
default=12)

Definition at line 171 of file apdb.py.

◆ read_sources_months

lsst.dax.apdb.apdb.ApdbConfig.read_sources_months
static
Initial value:
= Field(dtype=int,
doc="Number of months of history to read from DiaSource",
default=12)

Definition at line 168 of file apdb.py.

◆ schema_file

lsst.dax.apdb.apdb.ApdbConfig.schema_file
static
Initial value:
= Field(dtype=str,
doc="Location of (YAML) configuration file with standard schema",
default=_data_file_name("apdb-schema.yaml"))

Definition at line 180 of file apdb.py.

◆ sql_echo

lsst.dax.apdb.apdb.ApdbConfig.sql_echo
static
Initial value:
= Field(dtype=bool,
doc="If True then pass SQLAlchemy echo option.",
default=False)

Definition at line 156 of file apdb.py.

◆ timer

lsst.dax.apdb.apdb.ApdbConfig.timer
static
Initial value:
= Field(dtype=bool,
doc="If True then print/log timing information",
default=False)

Definition at line 195 of file apdb.py.


The documentation for this class was generated from the following file: