mebauer / duckdb-python-basics

A Beginner's Guide to DuckDB's Python Client
MIT License
39 stars 1 forks source link

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

Open gvwilson opened 1 week ago

gvwilson commented 1 week ago

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

mebauer commented 6 days ago

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.