from .env_setup import postgres_conn
from pathlib import Path


def run():
    #get relative path
    p = Path(__file__).with_name("selected_trials.sql")
    with open(p,'r') as fh:
        sqlfile = fh.read()
        with postgres_conn() as connection:
            with connection.cursor() as curse:
                curse.execute(sqlfile)

if __name__ == "__main__":
    run()
