catherinedevlin/ipython-sql

Loading from dsn file is not working

sivankumar86 opened this issue · 1 comments

Steps to reproduce the issue.

  1. Create dsn file
  2. Run below commands
    %config SqlMagic.dsn_filename='./dsn.ini'
    %sql –section [DB_CONFIG_1]

I get below error instead of connecting to db

"Environment variable $DATABASE_URL not set, and no connect string given."

@sivankumar86 check out this section here
Your syntax is off, use %sql --section DB_CONFIG_1. Also make sure you have psycopg2 installed and there are no spaces in the .ini file.
Just tested via Jupysql and a local postgres and it works!