Skip to content

Conversation

@zilto
Copy link
Collaborator

@zilto zilto commented Aug 4, 2025

This follows #2929 and adds DOT export.

Example

Visualize you dlt.Schema inside notebooks (marimo, VSCode, Colab, Databricks, Jupyter, etc.). This requires no additional dependencies. You can also render it to a file (.png, .svg, etc.) using graphviz

image

Design

  • the DOT is produced by handling strings instead of using graphviz. This allows to make it 0 dependency. This is particularly useful because the graphviz Python library depends on graphviz system installs
  • add _repr_html_ to dlt.Schema, this method is automatically picked up by notebook renderers. This method wraps the DOT string into an HTML that loads JS bundles from the web to render the viz. This won't work offline
  • add render_schema_with_graphviz(). This requires graphviz dependency and allows to render the dlt.Schema as svg, png, jpeg, pdf, etc.
  • update CLI commands
  • update documentation
  • testing is minimal because we can't do DOT -> dlt reliably

@netlify
Copy link

netlify bot commented Aug 4, 2025

Deploy Preview for dlt-hub-docs ready!

Name Link
🔨 Latest commit 0cd3966
🔍 Latest deploy log https://app.netlify.com/projects/dlt-hub-docs/deploys/6899e1718bbcd80008f38e88
😎 Deploy Preview https://deploy-preview-2959--dlt-hub-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@zilto zilto requested a review from rudolfix August 4, 2025 18:27
@zilto zilto self-assigned this Aug 4, 2025
@zilto zilto added the enhancement New feature or request label Aug 4, 2025
rudolfix
rudolfix previously approved these changes Aug 11, 2025
Copy link
Collaborator

@rudolfix rudolfix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I'm not sure how many schema converters we'll need in the future but maybe we need to make them pluggable ie. via our existing pluggy and standard interface with schema import/export (it is almost standard btw.)
also some settings could be configurable ie. html template and colors. this is easy to add and we can do it in the future

Copy link
Collaborator

@rudolfix rudolfix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@zilto zilto merged commit 3be0857 into devel Aug 12, 2025
60 of 61 checks passed
@zilto zilto deleted the feat/graphviz-export branch August 12, 2025 18:02
@zilto zilto added the release-highlight Changes to highlight in release notes label Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request release-highlight Changes to highlight in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants