Exporting and the fidelity report

功能的

HTML, PDF, Excel, Markdown, CSV, SVG and PNG reports with layout templates and redaction, and what each format can and cannot show.

Exporting a notebook: one dialog for every format, a fidelity report of what the chosen format can't show, and a sensitive parameter's value left out before anything is written.

Real recording · typing sped up · Northwind demo data

Open the walkthrough on its own page

A notebook exports as a report for people who don't use SQLly: a web page, a PDF, an Excel workbook, Markdown, CSV files, or chart images. Every format is built from the same report, so numbers, dates, titles and chart series match across all of them, and every export tells you what its format can't show before it writes anything.

The Export dialog

选择 Export ▸ Export… in the notebook's top bar (or Notebook: Export…). The Export Notebook window has:

格式
Web page (HTML), PDF document, Excel 工作簿, Markdown, CSV (one file per table), SVG (one image per chart), PNG (one image per chart), and clean notebook copies: SQLLY notebook copy (.sqllynb) 和 Jupyter notebook (.ipynb).
布局
As the notebook is laid out, or a template (below).
Include
Whole notebook, Dashboard: … (one of the notebook's dashboards, keeping its arrangement), or Selected cells.
SQL
Next to each result, In an appendix (the default) or Leave out.
选项
Include where each result came from (connection, database, environment, when it was read, rows, run id, SQL hash), Leave out all row data (structure only), 深色主题 (PDF, SVG, PNG), and Start each dashboard section on a new page (dashboard PDFs).
结果
Current results,或 Saved run from …: a run recorded by the app, the CLI or a schedule.

Before anything is written, the preview lists the 文件 it will create, What this format can't show (or "Everything carries over."), and what was Removed before writing (or "Nothing sensitive was found."). Charts and CSV tables go next to the file you choose, never anywhere else, and files are written atomically, so a failed export leaves the old file as it was.

SQLly
Export Notebook dialog with options and a previewExport Notebook dialog with options and a preview
The Export dialog: format, layout, scope, SQL placement, results, and the preview of files and fidelity notes.

导出 Markdown 和 导出 Jupyter in the Export menu skip the dialog and use its defaults (Markdown with SQL next to each result); if they find sensitive data they open the dialog instead. To export a local table as Parquet or CSV, use Export Parquet 在 Local data page. From a terminal, sqlly-cli notebook export writes the same reports from a recorded run; see the CLI.

Layout templates

模板顺序SQLSourcesRows per table
Executive summaryKPI tiles first, then recommendations, facts and warnings, then the restLeft outLeft out20
Technical incidentWarnings and failed checks first, then hypotheses and derived figuresNext to each resultAppendix200
审核As the notebook is laid outAppendixAppendix全部
FinancialKPI tiles first; decimals shown with two places and thousands separatorsAppendixAppendix500
OperationalKPI tiles, then checks, then charts, without a contents listLeft outAppendix50

KPI tiles are set four to a row. On a dashboard export, a template keeps the dashboard's own arrangement and brings only its SQL, source and row settings.

What each format keeps: the fidelity report

No static file can do everything the app does, so every export lists what its format lost. This is what to expect:

超文本标记语言PDFExcelMarkdownCSV
InteractivityStatic (no hover, zoom or sort)StaticStatic; data sheets keep Excel filtersStatic仅数据
图表Inline vector SVG, light and darkVector, one fixed themePNG pictures next to the dataAn SVG file per chart, one fixed themeNot drawn; their data is included
Dashboard columnsSide by side, stacking under 720 pxKPI rows side by side, other tiles stackedFlattened into rows堆叠Flattened
表All rows (or the template's cap)Paged with repeated headers; cells wrap to 3 lines; columns past the page width dropped; 5,000 rows unless the template says otherwiseAll rows, up to Excel's sheet limitsAll rows (or the template's cap)All rows and columns
数字精确精确Excel keeps 15 significant digits; integers longer than that and NaN/Infinity are written as text精确精确
日期和时间As writtenAs writtenExcel dates; dates before 1900 stay text, and times with a UTC offset are converted to UTC (reported)As writtenAs written
Partial dataA chart drawn from a truncated, sampled or partial result carries its badge inside the picture in every format; KPI cards keep their "computed from incomplete data" note; tables that hold only part of their result are reported.
Formula-looking textEscapedShown as textQuote-prefixed so Excel doesn't run itEscapedGuarded with a leading apostrophe
Markdown cellsRaw HTML, unsafe links and images that load from the internet are removed, with counts in the report.
Scripts任意Latin, Greek and Cyrillic; CJK characters show as boxes and right-to-left or joined scripts are drawn letter by letter (both reported)任意任意任意

SVG and PNG exports write one image per chart. The notes you may see, each worded as the export shows it:

  • Charts and tables are static: hover, zoom and sorting are not available.
  • Linked cells no longer filter each other.
  • Charts are embedded as pictures, not as editable charts. / Charts are not drawn in this format; their data is included instead.
  • Dashboard columns are shown one under another.
  • A table shows the first 5,000 of 48,210 rows. / A table shows 8 of its 14 columns to fit the page. / Long cell text was shortened to fit the page.
  • Excel keeps 15 significant digits, so some values in Amount are rounded. / Integers in Id are too large for an Excel number and were written as text.
  • 12 characters have no glyph in the PDF font and show as boxes. / Right-to-left and joined scripts are drawn letter by letter and may not read correctly.
  • 3 pieces of raw HTML in text cells were removed. / 2 links with unsafe targets were removed. / 1 images that would load from the internet were removed.
  • Colors are fixed to one theme and do not follow light or dark mode.
  • A chart has too many categories to draw; 140 of them are grouped under Other. (The chart folds the rest into an "Other" bar or slice instead of leaving them out.)
  • Some tables or charts hold only part of their query's result (truncated, sampled or stopped early).
  • Excel has no time zones, so times with an offset in Shipped were converted to UTC.

What goes into a report

  • Markdown cells as text; SQL cells as a heading, the SQL (where you chose), the result table and where it came from; chart cells as charts over their input; KPI cells as tiles; Tests cells as a row per check; table and pivot cells as their input's table; AI cells as labelled findings (an unverified finding is titled "Unverified").
  • Parameter cells, dashboard layout cells and other kinds are left out of a whole-notebook report; choose a dashboard under Include to export its arrangement.
  • Cut-short tables say so, checks that couldn't reach a verdict keep their Inconclusive status and reason, and cell errors become warning callouts.
  • HTML pages are one self-contained file with no scripts.

Redaction: what never leaves

Every export removes, before rendering:

  • Values of parameters marked sensitive, wherever they appear, replaced with [redacted].
  • Columns marked sensitive, from tables and charts.
  • Anything that looks like a password, private key, access token or connection-string secret, in SQL, settings or results.

When it finds something, the dialog stops at "This export contains sensitive data" ("The items listed are removed or masked in the file. Continue only if the rest may leave this computer.") with Export with these removed 和 返回. Leave out all row data drops every row and every figure taken from the data: row totals, truncation badges, check results and messages (such as failing-row counts), KPI values, status and notes, and AI findings that quote the data. Structure, SQL and the checks' definitions stay. Notebook copies (.sqllynb, .ipynb) also leave out results, personal parameter values and your computer's connection mappings: "connections keep only their names".

SQLly
Export confirmation listing sensitive items removedExport confirmation listing sensitive items removed
Exporting a notebook with a sensitive parameter: the confirmation lists what is removed before anything is written.

Exports in the audit log

Every export, from the dialog or from sqlly-cli notebook export, adds an entry to the notebook's audit log: the format, what was exported (whole notebook, a dashboard or selected cells, with their ids), whether it was structure only, what redaction removed, and which kinds of sensitive data were found. Never the exported data itself, and never the values found. Failed writes are recorded too, and so are exports the CLI refuses.

限制

  • Excel charts are pictures, not native Excel charts.
  • PDF text has no kerning or shaping, bold and italic are synthesized, there is no tagged (accessible) PDF, and the contents are PDF bookmarks rather than a printed contents page.
  • Report text added by SQLly (KPI comparison names, check names, failing-row counts, the run line) follows the app's language in exports from the app; sqlly-cli notebook export writes it in English.
  • PDF and PNG exports aren't available in the browser build.