diff --git a/python/target_selection/sdss_id/append_to_sdss_id.py b/python/target_selection/sdss_id/append_to_sdss_id.py index 0151da45..fdddb326 100644 --- a/python/target_selection/sdss_id/append_to_sdss_id.py +++ b/python/target_selection/sdss_id/append_to_sdss_id.py @@ -11,6 +11,7 @@ import peewee from peewee import JOIN, fn + from sdssdb.peewee.sdss5db.catalogdb import Catalog, database from sdssdb.peewee.sdss5db.targetdb import Target @@ -21,6 +22,7 @@ create_unique_from_region, ) + database.connect(dbname="sdss5db", user="sdss_user") diff --git a/python/target_selection/sdss_id/create_catalogidx_to_catalogidy.py b/python/target_selection/sdss_id/create_catalogidx_to_catalogidy.py index 32d92663..519b9a6c 100644 --- a/python/target_selection/sdss_id/create_catalogidx_to_catalogidy.py +++ b/python/target_selection/sdss_id/create_catalogidx_to_catalogidy.py @@ -15,11 +15,13 @@ import yaml from peewee import JOIN, fn from playhouse.postgres_ext import ArrayField + from sdssdb.peewee.sdss5db.catalogdb import Catalog, database from sdssdb.peewee.sdss5db.targetdb import Target import target_selection + database.connect(dbname='sdss5db', user="sdss_user") # Use 'sdss' to get read/write permissions