-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Do we have a recipe for one someone could write database query code that could be used interchangeably between NERSC and NOIRLab with minimal modification, ideally with a starting if/then block to identify location and then allow everything else to be the same?
It appears that NOIRLab requires access through the datalab dl.queryClient.query interface specific to the NOIRLab DBs, while the DESI NERSC database supports direct access via psycopg2 or the schema-specific specprod-db . But I don't see an obvious way to write database query code that could work at either location, despite both locations having very similar DESI databases. Or maybe NOIRLab does allow direct psycopg2 connections, it just isn't the documented/recommended way if working entirely within the NOIRLab ecosystem?
Detail: They also use different schema names (e.g. desi_edr vs. fuji) but if that was the only difference I think it could be easily handled at the top of a script.