HMpTy.mysql.add_htm_ids_to_mysql_database_table (function)

HMpTy.mysql.add_htm_ids_to_mysql_database_table(raColName, declColName, tableName, dbConn, log, primaryIdColumnName='primaryId', cartesian=False, batchSize=50000, reindex=False, dbSettings=False)[source]

Given a database connection, a name of a table and the column names for RA and DEC, generates ID for one or more HTM level in the table

Key Arguments:
  • raColName – ra in sexegesimal
  • declColName – dec in sexegesimal
  • tableName – name of table to add htmid info to
  • dbConn – database hosting the above table
  • log – logger
  • primaryIdColumnName – the primary id for the table
  • cartesian – add cartesian columns. Default False
  • batchSize – the size of the batches of rows to add HTMIds to concurrently. Default 2500
  • reindex – reindex the entire table
  • dbSettings – yaml settings for database
Return:
  • None

Usage:

from HMpTy.mysql import add_htm_ids_to_mysql_database_table
add_htm_ids_to_mysql_database_table(
    raColName="raDeg",
    declColName="decDeg",
    tableName="my_big_star_table",
    dbConn=dbConn,
    log=log,
    primaryIdColumnName="primaryId",
    reindex=False
)