duckdb-python-basics icon indicating copy to clipboard operation
duckdb-python-basics copied to clipboard

Q: what value to use for DATABASE_URL environment variable in duckdb-python-basics.ipynb tutorial?

Open gvwilson opened this issue 1 year ago • 3 comments

Thanks very much for sharing this tutorial. I'm working through duckdb-python-basics.ipynb and am getting the error:

sql.connection.ConnectionError: Environment variable $DATABASE_URL not set, and no connect string given.

from the first cell in Section 8 "Jupyter Notebooks and Querying Pandas Dataframes". I understand what's required (have used SQLAlchemy and %%sql before) but don't know what value you're expecting: my apologies if it's documented and I've missed it. Thanks again - @gvwilson

gvwilson avatar Oct 25 '24 13:10 gvwilson

Hi @gvwilson,

Thanks for your interest in this tutorial! This tutorial is based almost entirely on the official DuckDB Documentation. Specifically, section 8 was inspired from the DuckDB Guide Jupyter Notebooks.

Also worth noting that this section uses the JupySQL package. Take a look at JupySQL Quick Start. Did you install jupysql? We don't explicitly import jupysql in the notebook, but the package is used to convert a Jupyter code cell into a SQL cell.

mebauer avatar Oct 29 '24 00:10 mebauer

@gvwilson Did you ever resolve this on your machine?

mebauer avatar Dec 30 '24 20:12 mebauer

My apologies - I haven't had a chance to revisit it yet. If the tutorial is working for others, please close the issue.

gvwilson avatar Jan 08 '25 15:01 gvwilson