You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ClinicalTrialsDataProcessing/scripts/db_connection_test.py

12 lines
373 B
Python

from drugtools.env_setup import postgres_conn, mariadb_conn, ENV
print(ENV)
with postgres_conn() as pconn, pconn.cursor() as curse:
curse.execute("select nct_id FROM ctgov.studies LIMIT 10;")
print(curse.fetchall())
with mariadb_conn() as mconn, mconn.cursor() as mcurse:
mcurse.execute("select * FROM ALLNDC_HISTORY LIMIT 10;")
print(mcurse.fetchall())