Skip to content

Notebooks

Getting Started

In Connections, hover over a database and select Create New DBCode Notebook. The notebook opens with one SQL cell already linked to the selected connection, database, and default schema.

Create a new notebook

Use Code or Markdown in the notebook toolbar to add a cell. You can also open More Actions… in a cell toolbar and choose Insert Cell, or hover between cells or below the final cell to reveal the insert controls.

Open More Actions… and select Change Cell to Markdown to change a SQL cell to Markdown. The same menu lets you change a Markdown cell back to code.

Select Execute Cell to the left of a SQL cell to run it and display the result below the cell.

Execute cell

Use Run All in the notebook toolbar to execute every SQL cell. The selected cell toolbar also provides Execute Above Cells and Execute Cell and Below.

Each execution creates a result tab for that cell. By default, DBCode keeps up to three tabs. Use dbcode.notebook.maxTabs to change the limit.

When dbcode.notebook.maxTabs is set to 1, running the cell again refreshes the existing result tab and preserves its chart configuration.

Note: Unlike the SQL Editor, the Shift key modifier for toggling refresh-in-place is not available in notebooks since Shift+Enter is used to run cells. Use single-tab mode if you always want to refresh in place.

Notebook outputs are not saved in the file by default. Select Save Output: Off in the toolbar to enable output saving before you save the notebook.

Saved outputs can contain sensitive data. Review them before sharing a notebook.

Open More Actions… in the cell toolbar to find the insert and join commands.

Join cells

  • Join With Previous Cell combines the current cell with the cell above it.
  • Join With Next Cell combines the current cell with the cell below it.
  • Join Selected Cells combines all selected cells.
  • Start Simple: Begin with basic SQL queries to get familiar with the interface.
  • Use Markdown: Add Markdown cells to document your analysis and findings.
  • Experiment: Notebooks are useful for iterative data exploration.
  • Save Frequently: Save your work as you progress.

Once you’re comfortable with the basics, explore: