Skip to content

feat(export): export a data dictionary of tables and columns as Markdown or HTML - #3735

Merged
datlechin merged 5 commits into
mainfrom
feat/3624-data-dictionary-export
Oct 21, 2026
Merged

datlechin merged 5 commits into
mainfrom
feat/3624-data-dictionary-export

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • New bundled export format, Data Dictionary (DataDictionaryExportPlugin), in the Export sheet's tree and saved selections. File > Export > Export Data Dictionary… opens the sheet on it.
  • Per table, view, materialized view and foreign table: kind, comment, one row per column (type, nullable, default, primary key, foreign key target, comment), then indexes and foreign keys.
  • Markdown with a contents list and an explicit anchor per object, or one HTML file with inline style, no script or external asset, and print rules.
  • Default, Key, References and Comment columns are left out when nothing in the file fills them.
  • A failed read is named in the file and in the summary alert.
  • Reads the catalog only. Not offered for MongoDB, Firebase and Bigtable (columnsAreSampled), nor DynamoDB and SurrealDB, whose column lists sample items.
  • PluginKit, additive (kit stays 40): ExportFormatPlugin.readsRows(optionValues:kind:), PluginExportDataSource.fetchIndexes and fetchObjectComment, PluginDatabaseDriver.fetchObjectComment(table:schema:).
  • fetchObjectComment defaults to the table metadata's comment. DuckDB answers it from the catalog, since its metadata probes up to 100,001 rows. The Structure tab and Edit Comment read the comment through it too.
  • ExportService counts rows only for objects whose rows the format reads. A SQL export with Structure only no longer runs COUNT(*) over every table first. An export that reads no rows shows progress in objects.
  • Row scope controls are hidden for a structure-only format.

Test plan

  • DataDictionaryExportTests: catalog-only reads, Markdown and HTML output, omitted columns, escaping, anchors, composite and cross-schema keys, read failures, prefix indexes, cancellation.
  • ExportServiceRowCountTests: no COUNT(*) for a structure-only export, only Data tables counted, views keep row progress.
  • ExportDataSourceAdapterCatalogTests, ExportFormatCatalogTests, SQLExportReadsRowsTests.
  • ExportUITests.testExportingADataDictionaryWritesMarkdown: File menu to a Markdown file on the fixture database.
  • verify.sh abi: additive, kit 40, minimum 19.

Fixes #3624

@datlechin
datlechin enabled auto-merge (squash) October 21, 2026 03:01
@datlechin
datlechin merged commit 62dc8b4 into main Oct 21, 2026
8 checks passed
@datlechin
datlechin deleted the feat/3624-data-dictionary-export branch October 21, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export a data dictionary of every table and column

1 participant