Introducing Flights: agent-native data pipelines in MotherDuckJoin the livestream

Skip to main content

Jupyter

Jupyter notebooks can query MotherDuck through the DuckDB Python package and an md: connection string.

How it works with MotherDuck

  1. Install DuckDB in the notebook environment.
  2. Provide a MotherDuck access token with an environment variable or connection parameter.
  3. Use DuckDB SQL from Python cells to explore or transform MotherDuck data.

Example

import duckdb

con = duckdb.connect('md:my_db')
con.sql('SELECT current_database()').show()