LSST Applications g0603fd7c41+501e3db9f9,g0aad566f14+23d8574c86,g0dd44d6229+a1a4c8b791,g2079a07aa2+86d27d4dc4,g2305ad1205+a62672bbc1,g2bbee38e9b+047b288a59,g337abbeb29+047b288a59,g33d1c0ed96+047b288a59,g3a166c0a6a+047b288a59,g3d1719c13e+23d8574c86,g487adcacf7+cb7fd919b2,g4be5004598+23d8574c86,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+4a9e435310,g63cd9335cc+585e252eca,g858d7b2824+23d8574c86,g88963caddf+0cb8e002cc,g99cad8db69+43388bcaec,g9ddcbc5298+9a081db1e4,ga1e77700b3+a912195c07,gae0086650b+585e252eca,gb0e22166c9+60f28cb32d,gb2522980b2+793639e996,gb3a676b8dc+b4feba26a1,gb4b16eec92+63f8520565,gba4ed39666+c2a2e4ac27,gbb8dafda3b+a5d255a82e,gc120e1dc64+d820f8acdb,gc28159a63d+047b288a59,gc3e9b769f7+f4f1cc6b50,gcf0d15dbbd+a1a4c8b791,gdaeeff99f8+f9a426f77a,gdb0af172c8+b6d5496702,ge79ae78c31+047b288a59,w.2024.19
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig Class Reference

Public Member Functions

 __init__ (self, ApdbCassandraConfig config)
 
str to_json (self)
 
None update (self, str json_str)
 

Public Attributes

 use_insert_id
 
 part_pixelization
 
 part_pix_level
 
 ra_dec_columns
 
 time_partition_tables
 
 time_partition_days
 
 use_insert_id_skips_diaobjects
 

Static Public Attributes

bool use_insert_id
 
str part_pixelization
 
int part_pix_level
 
list ra_dec_columns [str]
 
bool time_partition_tables
 
int time_partition_days
 
bool use_insert_id_skips_diaobjects
 

Detailed Description

Part of the configuration that is saved in metadata table and read back.

The attributes are a subset of attributes in `ApdbCassandraConfig` class.

Parameters
----------
config : `ApdbSqlConfig`
    Configuration used to copy initial values of attributes.

Definition at line 188 of file apdbCassandra.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.__init__ ( self,
ApdbCassandraConfig config )

Definition at line 207 of file apdbCassandra.py.

207 def __init__(self, config: ApdbCassandraConfig):
208 self.use_insert_id = config.use_insert_id
209 self.part_pixelization = config.part_pixelization
210 self.part_pix_level = config.part_pix_level
211 self.ra_dec_columns = list(config.ra_dec_columns)
212 self.time_partition_tables = config.time_partition_tables
213 self.time_partition_days = config.time_partition_days
214 self.use_insert_id_skips_diaobjects = config.use_insert_id_skips_diaobjects
215

Member Function Documentation

◆ to_json()

str lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.to_json ( self)
Convert this instance to JSON representation.

Definition at line 216 of file apdbCassandra.py.

216 def to_json(self) -> str:
217 """Convert this instance to JSON representation."""
218 return json.dumps(dataclasses.asdict(self))
219

◆ update()

None lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.update ( self,
str json_str )
Update attribute values from a JSON string.

Parameters
----------
json_str : str
    String containing JSON representation of configuration.

Definition at line 220 of file apdbCassandra.py.

220 def update(self, json_str: str) -> None:
221 """Update attribute values from a JSON string.
222
223 Parameters
224 ----------
225 json_str : str
226 String containing JSON representation of configuration.
227 """
228 data = json.loads(json_str)
229 if not isinstance(data, dict):
230 raise TypeError(f"JSON string must be convertible to object: {json_str!r}")
231 allowed_names = {field.name for field in dataclasses.fields(self)}
232 for key, value in data.items():
233 if key not in allowed_names:
234 raise ValueError(f"JSON object contains unknown key: {key}")
235 setattr(self, key, value)
236
237

Member Data Documentation

◆ part_pix_level [1/2]

int lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.part_pix_level
static

Definition at line 201 of file apdbCassandra.py.

◆ part_pix_level [2/2]

lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.part_pix_level

Definition at line 210 of file apdbCassandra.py.

◆ part_pixelization [1/2]

str lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.part_pixelization
static

Definition at line 200 of file apdbCassandra.py.

◆ part_pixelization [2/2]

lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.part_pixelization

Definition at line 209 of file apdbCassandra.py.

◆ ra_dec_columns [1/2]

list lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.ra_dec_columns [str]
static

Definition at line 202 of file apdbCassandra.py.

◆ ra_dec_columns [2/2]

lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.ra_dec_columns

Definition at line 211 of file apdbCassandra.py.

◆ time_partition_days [1/2]

int lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.time_partition_days
static

Definition at line 204 of file apdbCassandra.py.

◆ time_partition_days [2/2]

lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.time_partition_days

Definition at line 213 of file apdbCassandra.py.

◆ time_partition_tables [1/2]

bool lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.time_partition_tables
static

Definition at line 203 of file apdbCassandra.py.

◆ time_partition_tables [2/2]

lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.time_partition_tables

Definition at line 212 of file apdbCassandra.py.

◆ use_insert_id [1/2]

bool lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.use_insert_id
static

Definition at line 199 of file apdbCassandra.py.

◆ use_insert_id [2/2]

lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.use_insert_id

Definition at line 208 of file apdbCassandra.py.

◆ use_insert_id_skips_diaobjects [1/2]

bool lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.use_insert_id_skips_diaobjects
static

Definition at line 205 of file apdbCassandra.py.

◆ use_insert_id_skips_diaobjects [2/2]

lsst.dax.apdb.cassandra.apdbCassandra._FrozenApdbCassandraConfig.use_insert_id_skips_diaobjects

Definition at line 214 of file apdbCassandra.py.


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