QueryDeck Docs
Notebooks

Export a notebook

Three formats — PDF, HTML, and .ipynb — each for a different audience.

For: analysts and developers sharing notebook results.

QueryDeck exports notebooks in three formats. Pick based on who's going to read it and whether they need to re-run anything.

FormatBest forRe-runnable?
PDFReports for stakeholders, sharing externallyNo
HTMLLightweight sharing, embedding in a wikiNo
.ipynbImporting into Jupyter, Hex, Deepnote, or other notebook toolsYes (the SQL cells become Python with a SQL magic, or a comment, depending on importer)

How to export

  1. Open the notebook.
  2. FileExport Notebook... (or the export icon in the toolbar).
  3. Pick a format.
  4. Choose options for that format.
  5. Pick a destination.

The export is fast — under a second for typical notebooks.

PDF

Best for sharing a polished, paged document.

What's included

  • The notebook title.
  • Every Markdown cell, rendered.
  • Every SQL cell, with the query in a syntax-highlighted block.
  • The cached result of each SQL cell, formatted as a table.

Options

OptionDefaultNotes
Page sizeA4Or US Letter
OrientationPortraitWide tables benefit from Landscape
Include SQLOnTurn off to ship only the prose and results
Include row countOn"Showing 10 of 142 rows" footers below each result
ThemeLightDark theme available for screen reading
Max rows per result50Cap on rows printed per cell to keep the PDF compact

For long results, the cap means you'll see a "Showing X of Y rows" footer. To export everything, raise the cap or use the HTML export.

Use it when

  • A stakeholder asked for "a PDF report".
  • You're attaching the analysis to an email or a ticket.
  • The audience won't open code-friendly formats.

HTML

Best for sharing on the web or pasting into a wiki.

What's included

Same as PDF: title, markdown, SQL, results. The HTML is self-contained — one file with inline CSS, no external dependencies.

Options

OptionDefaultNotes
Include SQLOnSame as PDF
ThemeAuto (light/dark via prefers-color-scheme)The reader's browser picks
Max rows per result100Higher than PDF since scrolling is fine
Embed imagesOnLocal images get inlined as base64

Use it when

  • You're hosting the report on a wiki or internal site.
  • You want a one-file artifact that opens in any browser.
  • Tables are large enough that pagination would hurt readability.

.ipynb

Best for handing the notebook to someone who works in Jupyter, Hex, or Deepnote.

What's included

  • Markdown cells become Markdown cells in the .ipynb (1:1).
  • SQL cells become code cells. The exact format depends on what flavor of .ipynb you target:
    • Jupyter classic: SQL is wrapped in a comment block at the top of a code cell. The reader is expected to use a SQL extension (jupysql, ipython-sql) to run it.
    • .ipynb with QueryDeck signature: A qd-sql metadata block lets QueryDeck re-import the notebook later without losing fidelity.
  • Cached results are included as the cell output. This means the file shows the same numbers it showed in QueryDeck, even if the receiver doesn't run anything.

Options

OptionDefaultNotes
FlavorQueryDeck-compatibleUse "Jupyter SQL magic" if the receiver expects %sql
Include cached resultsOnOff if you want the receiver to run from scratch
Include connection metadataOn (anonymized)The host is included as a comment, password is never written

The receiver's tool will tell them how to run the SQL cells. We don't ship a kernel — that's by design.

Use it when

  • A data scientist needs to extend the notebook with Python.
  • You're handing off to someone whose primary tool is Jupyter or Hex.
  • The project has a notebook-based pipeline and you want to feed in.

Copy as Markdown

For a quick paste into Slack, Linear, or a doc:

FileCopy as Markdown. The entire notebook is on the clipboard as plain markdown — SQL cells become fenced code blocks, results become markdown tables.

This is the fastest way to share a single notebook's contents without producing a file.

What's not yet supported

  • Excel export. You can export individual result tabs to Excel (see Export data) but a whole notebook to Excel isn't a thing yet.
  • Live HTML where the SQL re-runs in the browser. The exported HTML is a snapshot, not an interactive document.
  • Per-cell export. Export is whole-notebook. To share one cell, copy its content manually.

Vote for any of these via the in-app feedback button.

What's next

  • Overview for the conceptual model
  • Cells for the editing experience