Notebooks¶
Interactive data exploration with Marimo notebooks and DuckDB.
Overview¶
Dashboards show you what's happening — notebooks let you ask why. Dango integrates Marimo, a reactive Python notebook, with your DuckDB warehouse so you can run ad-hoc queries, build visualizations, and investigate data issues without leaving the platform.
Key features:
- Reactive Python notebooks — Marimo cells re-execute automatically when dependencies change
- DuckDB snapshots — notebooks query a read-only copy of your warehouse, so syncs and transforms are never blocked (see DuckDB core concepts)
- File locking — time-limited locks with heartbeat prevent conflicts when multiple users edit notebooks
- Starter templates — pre-built notebooks for data exploration and quality checks
How It Works¶
When you open a notebook, Dango performs these steps automatically:
- Lock — acquires a file-level lock so no one else can edit the same notebook
- Snapshot — copies
data/warehouse.duckdbto.dango/snapshots/(if Marimo isn't already running) - Start — launches the Marimo server (headless, on port 7805)
- Connect — opens the notebook in your browser, connected to the read-only snapshot
- Release — when you're done (Ctrl+C or release via web UI), the lock is released
Quick Start¶
# Create a notebook from the explore template
dango notebook new --template explore --name my_analysis
# Open it in Marimo
dango notebook open my_analysis
# Press Ctrl+C to release the lock and exit
Key Concepts¶
| Concept | Description | Learn More |
|---|---|---|
| Templates | Pre-built notebooks for exploration, quality checks, or a blank canvas | Templates |
| DuckDB Snapshots | Read-only database copies that isolate notebooks from write operations | DuckDB Snapshots |
| File Locking | Time-limited locks with heartbeat to prevent editing conflicts | File Locking |
| Idle Shutdown | Automatic server shutdown after inactivity (2h local, 1h cloud) | File Locking |
CLI vs Web UI¶
Navigate to Notebooks in the sidebar. From there you can:
- View all notebooks with lock status
- Create a new notebook from a template
- Click Open to acquire a lock and launch Marimo
- Release locks or make copies of locked notebooks
See Web UI — Notebooks for details.
Next Steps¶
-
Getting Started
Step-by-step guide to creating, opening, and querying your first notebook.
-
Templates
Pre-built notebooks for data exploration, quality checks, and custom analysis.
-
DuckDB Snapshots
How read-only snapshots keep notebooks isolated from write operations.
-
File Locking
Heartbeat-based locks, idle shutdown, and multi-user conflict prevention.