Dash Logo

Data Canvas

The canvas is your visual workspace in Dash. Instead of writing disconnected queries one by one, you arrange SQL nodes on an infinite canvas, connect them to each other, and watch your data flow in real time.

Everything runs locally in your browser — no server, no uploads, your data never leaves your machine.


Adding Nodes

Click the + button in the bottom toolbar to add a new query node. You can also drag from the toolbar to set the node's size before placing it.

The toolbar has four tools:

ToolWhat it does
PointerSelect, move, and resize nodes
HandPan the canvas without accidentally moving nodes
Query nodeAdd a SQL query node
Chart nodeAdd a query node pre-set to chart view
TextAdd a text label or heading
DrawFreehand drawing and annotations

Query Nodes

A query node is a SQL editor connected to your data. Write a query, press Run (or Cmd/Ctrl + Enter), and the results appear right inside the node.

Each node can display its results in multiple ways — switch between them at any time without re-running the query:

  • Table — a sortable, paginated spreadsheet
  • Chart — bar, line, area, scatter, pie, or radar chart
  • Select — turns the node into a dropdown input (see Interactive Canvases)

For example, this query counts trains per station and can be shown as a table or a bar chart:

SELECT
  StationName,
  COUNT(DISTINCT TrainNumber) AS "# Trains"
FROM Trains
GROUP BY ALL
ORDER BY #2 DESC

Chaining Queries Together

The real power of the canvas is that nodes can reference each other. In any node's SQL, use dash.ref_<name>() to use another node's results as a table.

Here a second node filters by the stations returned from a Stations node:

SELECT
  ServiceType,
  COUNT(DISTINCT TrainNumber) AS "# Trains"
FROM Trains
WHERE StationName IN
  (SELECT StationName FROM dash.ref_stations())
GROUP BY ALL
ORDER BY #2 DESC

In this example, stations is the display names of the upstream nodes.

When Dash detects a reference like this, it automatically draws an edge (arrow) between the two nodes to show the dependency. Downstream nodes re-run automatically whenever their upstream input changes — no manual refresh needed.

You can chain as many nodes as you like. Dash figures out the correct execution order and propagates changes through the graph.

The easiest way to connect nodes

Instead of typing the macro name manually, drag an edge from one node's handle to another. Dash will automatically insert the dash.ref_<name>() reference into the target node's SQL for you.


Interactive Canvases

The output of a node is reactive to the user's input. For example, if we use the Dropdown node to select stations, the emitted rows of the node are only the ones selected by the user using the dropdown.

In the next node, we can use the same dash.ref_<name>() reference to filter the trains by station:

SELECT
  ServiceType,
  COUNT(DISTINCT TrainNumber) AS "# Trains"
FROM Trains
WHERE StationName IN
  (SELECT StationName FROM dash.ref_stations())
GROUP BY ALL
ORDER BY #2 DESC

When the user picks a new value from the dropdown, all downstream nodes re-run instantly. This turns any canvas into a live, filterable dashboard — no code beyond SQL required.


Querying canvas nodes externally

The same dash.ref_<name>() references used on the canvas work from any DuckDB connection — the CLI, a notebook, or any language with a DuckDB driver. Load the community extension and point it at your file:

import duckdb

con = duckdb.connect()
con.execute("INSTALL dash FROM COMMUNITY; LOAD dash;")
con.execute("PRAGMA DASH;")

df = con.execute("SELECT * FROM dash.ref_monthly_revenue()").df()

dash.ref_<name>() executes the node's query and returns the result as a relation you can join, filter, or aggregate like any other table.


Text & Drawing

Beyond query nodes, you can annotate your canvas freely:

  • Text nodes — add headings (H1–H5), body text, or code labels in any style, size, and alignment. Double-click to edit.
  • Free draw nodes — sketch directly on the canvas with a pen, marker, or highlighter. Useful for circling things, drawing arrows, or leaving hand-written notes.

Undo & Redo

Every action on the canvas is fully undoable — moving nodes, editing SQL, drawing, connecting. Use the standard shortcuts:

  • Undo: Cmd/Ctrl + Z
  • Redo: Cmd/Ctrl + Shift + Z or Cmd/Ctrl + Y

Keyboard Shortcuts

ShortcutAction
Cmd/Ctrl + EnterRun query in selected node
Cmd/Ctrl + ZUndo
Cmd/Ctrl + Shift + ZRedo
Cmd/Ctrl + CCopy selected nodes
Cmd/Ctrl + VPaste nodes
Cmd/Ctrl + DDuplicate selected nodes
Delete / BackspaceDelete selected nodes
Space + dragPan the canvas