Google Colab
Google Colab notebooks can query MotherDuck by installing DuckDB and opening an md: connection from Python.
How it works with MotherDuck
- Install DuckDB in the Colab notebook.
- Store your MotherDuck token in Colab secrets or another notebook-safe secret store.
- Connect with
duckdb.connect("md:...")and run SQL from notebook cells.
Example
%pip install duckdb
import duckdb
con = duckdb.connect('md:my_db')
con.sql('SELECT current_database()').show()