LSST Applications g0265f82a02+c6dfa2ddaf,g1162b98a3f+b2075782a9,g2079a07aa2+1b2e822518,g2bbee38e9b+c6dfa2ddaf,g337abbeb29+c6dfa2ddaf,g3ddfee87b4+a60788ef87,g50ff169b8f+2eb0e556e8,g52b1c1532d+90ebb246c7,g555ede804d+a60788ef87,g591dd9f2cf+ba8caea58f,g5ec818987f+864ee9cddb,g858d7b2824+9ee1ab4172,g876c692160+a40945ebb7,g8a8a8dda67+90ebb246c7,g8cdfe0ae6a+4fd9e222a8,g99cad8db69+5e309b7bc6,g9ddcbc5298+a1346535a5,ga1e77700b3+df8f93165b,ga8c6da7877+aa12a14d27,gae46bcf261+c6dfa2ddaf,gb0e22166c9+8634eb87fb,gb3f2274832+d0da15e3be,gba4ed39666+1ac82b564f,gbb8dafda3b+5dfd9c994b,gbeb006f7da+97157f9740,gc28159a63d+c6dfa2ddaf,gc86a011abf+9ee1ab4172,gcf0d15dbbd+a60788ef87,gdaeeff99f8+1cafcb7cd4,gdc0c513512+9ee1ab4172,ge79ae78c31+c6dfa2ddaf,geb67518f79+ba1859f325,geb961e4c1e+f9439d1e6f,gee10cc3b42+90ebb246c7,gf1cff7945b+9ee1ab4172,w.2024.12
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema Class Reference
Inheritance diagram for lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema:
lsst.dax.apdb.apdbSchema.ApdbSchema

Public Member Functions

 __init__ (self, cassandra.cluster.Session session, str keyspace, str schema_file, str schema_name="ApdbSchema", str prefix="", bool time_partition_tables=False, bool use_insert_id=False)
 
bool has_insert_id (self)
 
bool empty (self)
 
str tableName (self, ApdbTables|ExtraTables table_name)
 
str keyspace (self)
 
Mapping[str, simple.Column] getColumnMap (self, ApdbTables|ExtraTables table_name)
 
list[str] apdbColumnNames (self, ApdbTables|ExtraTables table_name)
 
list[str] partitionColumns (self, ApdbTables|ExtraTables table_name)
 
list[str] clusteringColumns (self, ApdbTables|ExtraTables table_name)
 
None makeSchema (self, bool drop=False, tuple[int, int]|None part_range=None)
 

Protected Member Functions

Mapping[ApdbTables, simple.Table] _apdb_tables_schema (self, bool time_partition_tables)
 
Mapping[ExtraTables, simple.Table] _extra_tables_schema (self)
 
bool _check_insert_id (self)
 
None _makeTableSchema (self, ApdbTables|ExtraTables table, bool drop=False, tuple[int, int]|None part_range=None)
 
list[str] _tableColumns (self, ApdbTables|ExtraTables table_name)
 
simple.Table _table_schema (self, ApdbTables|ExtraTables table)
 

Protected Attributes

 _session
 
 _keyspace
 
 _prefix
 
 _time_partition_tables
 
 _use_insert_id
 
 _apdb_tables
 
 _extra_tables
 
 _has_insert_id
 

Static Protected Attributes

dict _type_map
 
list _time_partitioned_tables
 
list _spatially_partitioned_tables = [ApdbTables.DiaObjectLast]
 

Detailed Description

Class 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.

Definition at line 88 of file apdbCassandraSchema.py.

Constructor & Destructor Documentation

◆ __init__()

lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.__init__ ( self,
cassandra.cluster.Session session,
str keyspace,
str schema_file,
str schema_name = "ApdbSchema",
str prefix = "",
bool time_partition_tables = False,
bool use_insert_id = False )

Reimplemented from lsst.dax.apdb.apdbSchema.ApdbSchema.

Definition at line 130 of file apdbCassandraSchema.py.

139 ):
140 super().__init__(schema_file, schema_name)
141
142 self._session = session
143 self._keyspace = keyspace
144 self._prefix = prefix
145 self._time_partition_tables = time_partition_tables
146 self._use_insert_id = use_insert_id
147 self._has_insert_id: bool | None = None
148
149 self._apdb_tables = self._apdb_tables_schema(time_partition_tables)
150 self._extra_tables = self._extra_tables_schema()
151

Member Function Documentation

◆ _apdb_tables_schema()

Mapping[ApdbTables, simple.Table] lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._apdb_tables_schema ( self,
bool time_partition_tables )
protected
Generate schema for regular APDB tables.

Definition at line 152 of file apdbCassandraSchema.py.

152 def _apdb_tables_schema(self, time_partition_tables: bool) -> Mapping[ApdbTables, simple.Table]:
153 """Generate schema for regular APDB tables."""
154 apdb_tables: dict[ApdbTables, simple.Table] = {}
155
156 # add columns and index for partitioning.
157 for table, apdb_table_def in self.tableSchemas.items():
158 part_columns = []
159 add_columns = []
160 primary_key = apdb_table_def.primary_key[:]
161 if table in self._spatially_partitioned_tables:
162 # DiaObjectLast does not need temporal partitioning
163 part_columns = ["apdb_part"]
164 add_columns = part_columns
165 elif table in self._time_partitioned_tables:
166 if time_partition_tables:
167 part_columns = ["apdb_part"]
168 else:
169 part_columns = ["apdb_part", "apdb_time_part"]
170 add_columns = part_columns
171 elif table is ApdbTables.SSObject:
172 # For SSObject there is no natural partition key but we have
173 # to partition it because there are too many of them. I'm
174 # going to partition on its primary key (and drop separate
175 # primary key index).
176 part_columns = ["ssObjectId"]
177 primary_key = []
178 elif table is ApdbTables.metadata:
179 # Metadata is in one partition because we want to read all of
180 # it in one query, add an extra column for partition.
181 part_columns = ["meta_part"]
182 add_columns = part_columns
183 else:
184 # TODO: Do not know what to do with the other tables
185 continue
186
187 column_defs = []
188 if add_columns:
189 column_defs = [
190 simple.Column(id=f"#{name}", name=name, datatype=felis.types.Long, nullable=False)
191 for name in add_columns
192 ]
193
194 annotations = dict(apdb_table_def.annotations)
195 annotations["cassandra:apdb_column_names"] = [column.name for column in apdb_table_def.columns]
196 if part_columns:
197 annotations["cassandra:partitioning_columns"] = part_columns
198
199 apdb_tables[table] = simple.Table(
200 id=apdb_table_def.id,
201 name=apdb_table_def.name,
202 columns=column_defs + apdb_table_def.columns,
203 primary_key=primary_key,
204 indexes=[],
205 constraints=[],
206 annotations=annotations,
207 )
208
209 return apdb_tables
210
std::vector< SchemaItem< Flag > > * items

◆ _check_insert_id()

bool lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._check_insert_id ( self)
protected
Check whether database has tables for tracking insert IDs.

Definition at line 286 of file apdbCassandraSchema.py.

286 def _check_insert_id(self) -> bool:
287 """Check whether database has tables for tracking insert IDs."""
288 table_name = ExtraTables.DiaInsertId.table_name(self._prefix)
289 query = "SELECT count(*) FROM system_schema.tables WHERE keyspace_name = %s and table_name = %s"
290 result = self._session.execute(query, (self._keyspace, table_name))
291 row = result.one()
292 return bool(row[0])
293

◆ _extra_tables_schema()

Mapping[ExtraTables, simple.Table] lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._extra_tables_schema ( self)
protected
Generate schema for extra tables.

Definition at line 211 of file apdbCassandraSchema.py.

211 def _extra_tables_schema(self) -> Mapping[ExtraTables, simple.Table]:
212 """Generate schema for extra tables."""
213 extra_tables: dict[ExtraTables, simple.Table] = {}
214
215 # This table maps DiaSource ID to its partitions in DiaSource table and
216 # DiaSourceInsertId tables.
217 extra_tables[ExtraTables.DiaSourceToPartition] = simple.Table(
218 id="#" + ExtraTables.DiaSourceToPartition.value,
219 name=ExtraTables.DiaSourceToPartition.table_name(self._prefix),
220 columns=[
221 simple.Column(
222 id="#diaSourceId", name="diaSourceId", datatype=felis.types.Long, nullable=False
223 ),
224 simple.Column(id="#apdb_part", name="apdb_part", datatype=felis.types.Long, nullable=False),
225 simple.Column(
226 id="#apdb_time_part", name="apdb_time_part", datatype=felis.types.Int, nullable=False
227 ),
228 simple.Column(id="#insert_id", name="insert_id", datatype=_FelisUUID, nullable=True),
229 ],
230 primary_key=[],
231 indexes=[],
232 constraints=[],
233 annotations={"cassandra:partitioning_columns": ["diaSourceId"]},
234 )
235
236 insert_id_column = simple.Column(
237 id="#insert_id", name="insert_id", datatype=_FelisUUID, nullable=False
238 )
239
240 if not self._use_insert_id:
241 return extra_tables
242
243 # Table containing insert IDs, this one is not partitioned, but
244 # partition key must be defined.
245 extra_tables[ExtraTables.DiaInsertId] = simple.Table(
246 id="#" + ExtraTables.DiaInsertId.value,
247 name=ExtraTables.DiaInsertId.table_name(self._prefix),
248 columns=[
249 simple.Column(id="#partition", name="partition", datatype=felis.types.Int, nullable=False),
250 insert_id_column,
251 simple.Column(
252 id="#insert_time", name="insert_time", datatype=felis.types.Timestamp, nullable=False
253 ),
254 ],
255 primary_key=[insert_id_column],
256 indexes=[],
257 constraints=[],
258 annotations={"cassandra:partitioning_columns": ["partition"]},
259 )
260
261 for insert_id_table_enum, apdb_table_enum in ExtraTables.insert_id_tables().items():
262 apdb_table_def = self.tableSchemas[apdb_table_enum]
263
264 extra_tables[insert_id_table_enum] = simple.Table(
265 id="#" + insert_id_table_enum.value,
266 name=insert_id_table_enum.table_name(self._prefix),
267 columns=[insert_id_column] + apdb_table_def.columns,
268 primary_key=apdb_table_def.primary_key[:],
269 indexes=[],
270 constraints=[],
271 annotations={
272 "cassandra:partitioning_columns": ["insert_id"],
273 "cassandra:apdb_column_names": [column.name for column in apdb_table_def.columns],
274 },
275 )
276
277 return extra_tables
278

◆ _makeTableSchema()

None lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._makeTableSchema ( self,
ApdbTables | ExtraTables table,
bool drop = False,
tuple[int, int] | None part_range = None )
protected

Definition at line 436 of file apdbCassandraSchema.py.

441 ) -> None:
442 _LOG.debug("Making table %s", table)
443
444 fullTable = table.table_name(self._prefix)
445
446 table_list = [fullTable]
447 if part_range is not None:
448 if table in self._time_partitioned_tables:
449 partitions = range(*part_range)
450 table_list = [f"{fullTable}_{part}" for part in partitions]
451
452 if drop:
453 queries = [f'DROP TABLE IF EXISTS "{self._keyspace}"."{table_name}"' for table_name in table_list]
454 futures = [self._session.execute_async(query, timeout=None) for query in queries]
455 for future in futures:
456 _LOG.debug("wait for query: %s", future.query)
457 future.result()
458 _LOG.debug("query finished: %s", future.query)
459
460 queries = []
461 for table_name in table_list:
462 if_not_exists = "" if drop else "IF NOT EXISTS"
463 columns = ", ".join(self._tableColumns(table))
464 query = f'CREATE TABLE {if_not_exists} "{self._keyspace}"."{table_name}" ({columns})'
465 _LOG.debug("query: %s", query)
466 queries.append(query)
467 futures = [self._session.execute_async(query, timeout=None) for query in queries]
468 for future in futures:
469 _LOG.debug("wait for query: %s", future.query)
470 future.result()
471 _LOG.debug("query finished: %s", future.query)
472

◆ _table_schema()

simple.Table lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._table_schema ( self,
ApdbTables | ExtraTables table )
protected
Return schema definition for a table.

Definition at line 514 of file apdbCassandraSchema.py.

514 def _table_schema(self, table: ApdbTables | ExtraTables) -> simple.Table:
515 """Return schema definition for a table."""
516 if isinstance(table, ApdbTables):
517 table_schema = self._apdb_tables[table]
518 else:
519 table_schema = self._extra_tables[table]
520 return table_schema

◆ _tableColumns()

list[str] lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._tableColumns ( self,
ApdbTables | ExtraTables table_name )
protected
Return set of columns in a table

Parameters
----------
table_name : `ApdbTables`
    Name of the table.

Returns
-------
column_defs : `list`
    List of strings in the format "column_name type".

Definition at line 473 of file apdbCassandraSchema.py.

473 def _tableColumns(self, table_name: ApdbTables | ExtraTables) -> list[str]:
474 """Return set of columns in a table
475
476 Parameters
477 ----------
478 table_name : `ApdbTables`
479 Name of the table.
480
481 Returns
482 -------
483 column_defs : `list`
484 List of strings in the format "column_name type".
485 """
486 table_schema = self._table_schema(table_name)
487
488 # must have partition columns and clustering columns
489 part_columns = table_schema.annotations.get("cassandra:partitioning_columns", [])
490 clust_columns = [column.name for column in table_schema.primary_key]
491 _LOG.debug("part_columns: %s", part_columns)
492 _LOG.debug("clust_columns: %s", clust_columns)
493 if not part_columns:
494 raise ValueError(f"Table {table_name} configuration is missing partition index")
495
496 # all columns
497 column_defs = []
498 for column in table_schema.columns:
499 ctype = self._type_map[column.datatype]
500 column_defs.append(f'"{column.name}" {ctype}')
501
502 # primary key definition
503 part_columns = [f'"{col}"' for col in part_columns]
504 clust_columns = [f'"{col}"' for col in clust_columns]
505 if len(part_columns) > 1:
506 columns = ", ".join(part_columns)
507 part_columns = [f"({columns})"]
508 pkey = ", ".join(part_columns + clust_columns)
509 _LOG.debug("pkey: %s", pkey)
510 column_defs.append(f"PRIMARY KEY ({pkey})")
511
512 return column_defs
513

◆ apdbColumnNames()

list[str] lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.apdbColumnNames ( self,
ApdbTables | ExtraTables table_name )
Return a list of columns names for a table as defined in APDB
schema.

Parameters
----------
table_name : `ApdbTables` or `ExtraTables`
    Enum for a table in APDB schema.

Returns
-------
columns : `list` of `str`
    Names of regular columns in the table.

Definition at line 360 of file apdbCassandraSchema.py.

360 def apdbColumnNames(self, table_name: ApdbTables | ExtraTables) -> list[str]:
361 """Return a list of columns names for a table as defined in APDB
362 schema.
363
364 Parameters
365 ----------
366 table_name : `ApdbTables` or `ExtraTables`
367 Enum for a table in APDB schema.
368
369 Returns
370 -------
371 columns : `list` of `str`
372 Names of regular columns in the table.
373 """
374 table_schema = self._table_schema(table_name)
375 return table_schema.annotations["cassandra:apdb_column_names"]
376

◆ clusteringColumns()

list[str] lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.clusteringColumns ( self,
ApdbTables | ExtraTables 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 clustering.

Definition at line 393 of file apdbCassandraSchema.py.

393 def clusteringColumns(self, table_name: ApdbTables | ExtraTables) -> list[str]:
394 """Return a list of columns used for clustering.
395
396 Parameters
397 ----------
398 table_name : `ApdbTables`
399 Table name in APDB schema
400
401 Returns
402 -------
403 columns : `list` of `str`
404 Names of columns for used for clustering.
405 """
406 table_schema = self._table_schema(table_name)
407 return [column.name for column in table_schema.primary_key]
408

◆ empty()

bool lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.empty ( self)
Return True if database schema is empty.

Returns
-------
empty : `bool`
    `True` if none of the required APDB tables exist in the database,
    `False` if all required tables exist.

Raises
------
InconsistentSchemaError
    Raised when some of the required tables exist but not all.

Definition at line 294 of file apdbCassandraSchema.py.

294 def empty(self) -> bool:
295 """Return True if database schema is empty.
296
297 Returns
298 -------
299 empty : `bool`
300 `True` if none of the required APDB tables exist in the database,
301 `False` if all required tables exist.
302
303 Raises
304 ------
305 InconsistentSchemaError
306 Raised when some of the required tables exist but not all.
307 """
308 query = "SELECT table_name FROM system_schema.tables WHERE keyspace_name = %s"
309 result = self._session.execute(query, (self._keyspace,))
310 table_names = set(row[0] for row in result.all())
311
312 existing_tables = []
313 missing_tables = []
314 for table_enum in self._apdb_tables:
315 table_name = table_enum.table_name(self._prefix)
316 if self._time_partition_tables and table_enum in self._time_partitioned_tables:
317 # Check prefix for time-partitioned tables.
318 exists = any(table.startswith(f"{table_name}_") for table in table_names)
319 else:
320 exists = table_name in table_names
321 if exists:
322 existing_tables.append(table_name)
323 else:
324 missing_tables.append(table_name)
325
326 if not missing_tables:
327 return False
328 elif not existing_tables:
329 return True
330 else:
331 raise InconsistentSchemaError(
332 f"Only some required APDB tables exist: {existing_tables}, missing tables: {missing_tables}"
333 )
334
daf::base::PropertySet * set
Definition fits.cc:931

◆ getColumnMap()

Mapping[str, simple.Column] lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.getColumnMap ( self,
ApdbTables | ExtraTables table_name )
Return 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.

Definition at line 343 of file apdbCassandraSchema.py.

343 def getColumnMap(self, table_name: ApdbTables | ExtraTables) -> Mapping[str, simple.Column]:
344 """Return mapping of column names to Column definitions.
345
346 Parameters
347 ----------
348 table_name : `ApdbTables`
349 One of known APDB table names.
350
351 Returns
352 -------
353 column_map : `dict`
354 Mapping of column names to `ColumnDef` instances.
355 """
356 table_schema = self._table_schema(table_name)
357 cmap = {column.name: column for column in table_schema.columns}
358 return cmap
359

◆ has_insert_id()

bool lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.has_insert_id ( self)
Whether insert ID tables are to be used (`bool`).

Definition at line 280 of file apdbCassandraSchema.py.

280 def has_insert_id(self) -> bool:
281 """Whether insert ID tables are to be used (`bool`)."""
282 if self._has_insert_id is None:
283 self._has_insert_id = self._use_insert_id and self._check_insert_id()
284 return self._has_insert_id
285

◆ keyspace()

str lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.keyspace ( self)
Return Cassandra keyspace for APDB tables.

Definition at line 339 of file apdbCassandraSchema.py.

339 def keyspace(self) -> str:
340 """Return Cassandra keyspace for APDB tables."""
341 return self._keyspace
342

◆ makeSchema()

None lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.makeSchema ( self,
bool drop = False,
tuple[int, int] | None 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.

Definition at line 409 of file apdbCassandraSchema.py.

409 def makeSchema(self, drop: bool = False, part_range: tuple[int, int] | None = None) -> None:
410 """Create or re-create all tables.
411
412 Parameters
413 ----------
414 drop : `bool`
415 If True then drop tables before creating new ones.
416 part_range : `tuple` [ `int` ] or `None`
417 Start and end partition number for time partitions, end is not
418 inclusive. Used to create per-partition DiaObject, DiaSource, and
419 DiaForcedSource tables. If `None` then per-partition tables are
420 not created.
421 """
422 # Try to create keyspace if it does not exist
423 query = (
424 f'CREATE KEYSPACE IF NOT EXISTS "{self._keyspace}"'
425 " WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 3}"
426 )
427 self._session.execute(query)
428
429 for table in self._apdb_tables:
430 self._makeTableSchema(table, drop, part_range)
431 for extra_table in self._extra_tables:
432 self._makeTableSchema(extra_table, drop, part_range)
433 # Reset cached information.
434 self._has_insert_id = None
435

◆ partitionColumns()

list[str] lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.partitionColumns ( self,
ApdbTables | ExtraTables 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 used for partitioning.

Definition at line 377 of file apdbCassandraSchema.py.

377 def partitionColumns(self, table_name: ApdbTables | ExtraTables) -> list[str]:
378 """Return a list of columns used for table partitioning.
379
380 Parameters
381 ----------
382 table_name : `ApdbTables`
383 Table name in APDB schema
384
385 Returns
386 -------
387 columns : `list` of `str`
388 Names of columns used for partitioning.
389 """
390 table_schema = self._table_schema(table_name)
391 return table_schema.annotations.get("cassandra:partitioning_columns", [])
392

◆ tableName()

str lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema.tableName ( self,
ApdbTables | ExtraTables table_name )
Return Cassandra table name for APDB table.

Definition at line 335 of file apdbCassandraSchema.py.

335 def tableName(self, table_name: ApdbTables | ExtraTables) -> str:
336 """Return Cassandra table name for APDB table."""
337 return table_name.table_name(self._prefix)
338

Member Data Documentation

◆ _apdb_tables

lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._apdb_tables
protected

Definition at line 149 of file apdbCassandraSchema.py.

◆ _extra_tables

lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._extra_tables
protected

Definition at line 150 of file apdbCassandraSchema.py.

◆ _has_insert_id

lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._has_insert_id
protected

Definition at line 283 of file apdbCassandraSchema.py.

◆ _keyspace

lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._keyspace
protected

Definition at line 143 of file apdbCassandraSchema.py.

◆ _prefix

lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._prefix
protected

Definition at line 144 of file apdbCassandraSchema.py.

◆ _session

lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._session
protected

Definition at line 142 of file apdbCassandraSchema.py.

◆ _spatially_partitioned_tables

list lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._spatially_partitioned_tables = [ApdbTables.DiaObjectLast]
staticprotected

Definition at line 128 of file apdbCassandraSchema.py.

◆ _time_partition_tables

lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._time_partition_tables
protected

Definition at line 145 of file apdbCassandraSchema.py.

◆ _time_partitioned_tables

list lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._time_partitioned_tables
staticprotected
Initial value:
= [
ApdbTables.DiaObject,
ApdbTables.DiaSource,
ApdbTables.DiaForcedSource,
]

Definition at line 123 of file apdbCassandraSchema.py.

◆ _type_map

dict lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._type_map
staticprotected
Initial value:
= {
felis.types.Double: "DOUBLE",
felis.types.Float: "FLOAT",
felis.types.Timestamp: "TIMESTAMP",
felis.types.Long: "BIGINT",
felis.types.Int: "INT",
felis.types.Short: "INT",
felis.types.Byte: "TINYINT",
felis.types.Binary: "BLOB",
felis.types.Char: "TEXT",
felis.types.String: "TEXT",
felis.types.Unicode: "TEXT",
felis.types.Text: "TEXT",
felis.types.Boolean: "BOOLEAN",
_FelisUUID: "UUID",
}

Definition at line 105 of file apdbCassandraSchema.py.

◆ _use_insert_id

lsst.dax.apdb.apdbCassandraSchema.ApdbCassandraSchema._use_insert_id
protected

Definition at line 146 of file apdbCassandraSchema.py.


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