-
Notifications
You must be signed in to change notification settings - Fork 415
feat: dlt.Schema.to_dot() graphviz export
#2959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for dlt-hub-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
rudolfix
left a comment
There was a problem hiding this 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
3045978 to
0cd3966
Compare
rudolfix
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
This follows #2929 and adds DOT export.
Example
Visualize you
dlt.Schemainside notebooks (marimo, VSCode, Colab, Databricks, Jupyter, etc.). This requires no additional dependencies. You can also render it to a file (.png, .svg, etc.) usinggraphvizDesign
graphviz. This allows to make it 0 dependency. This is particularly useful because thegraphvizPython library depends on graphviz system installs_repr_html_todlt.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 offlinerender_schema_with_graphviz(). This requiresgraphvizdependency and allows to render thedlt.Schemaas svg, png, jpeg, pdf, etc.DOT -> dltreliably