Loading from dsn file is not working
sivankumar86 opened this issue · 1 comments
sivankumar86 commented
Steps to reproduce the issue.
- Create dsn file
- 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."
idomic commented
@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!