ipython-sql icon indicating copy to clipboard operation
ipython-sql copied to clipboard

Loading from dsn file is not working

Open sivankumar86 opened this issue 2 years ago • 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 avatar Dec 10 '22 06:12 sivankumar86

@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!

idomic avatar Dec 22 '22 04:12 idomic