ApdbPostgresQuery#

class lsst.analysis.ap.ApdbPostgresQuery(namespace, url='rubin@usdf-prompt-processing-dev.slac.stanford.edu/lsst-devl', instrument=None, **kwargs)#

Bases: DbSqlQuery

Connect to a running postgres APDB instance and load data from it.

This class connects to the database only when the connection context manager is entered, and closes the connection after it exits.

Parameters#

namespacestr

Database namespace to load from. Called “schema” in postgres docs.

urlstr

Complete url to connect to postgres database, without prepended postgresql://.

instrumentstr

Short name (e.g. “DECam”) of instrument to make a dataId unpacker and to add to the table columns; supports any gen3 instrument. To be deprecated once this information is in the database.

Attributes Summary

connection

Context manager for database connections.

Attributes Documentation

connection#