Skip to content

stackql-labs/sandbox-magic

Repository files navigation

Sandbox Magic

A collection of techniques, patterns, and examples for creating rich, interactive content in Databricks notebooks using Diagrams as Code principles.

Overview

This repository showcases various "magic" techniques for enhancing Databricks notebooks with:

  • Styled code blocks with syntax highlighting
  • Informative admonitions and callout boxes
  • Vendor icons from popular platforms
  • Mermaid diagrams for flowcharts, sequences, and more
  • PlantUML diagrams for UML and architecture
  • C4 architecture diagrams

Notebooks

Notebook Description
01 - Intro.ipynb Overview of the repository and Diagrams as Code concepts
02 - Icons.ipynb Vendor icons (AWS, Azure, Databricks, Snowflake, etc.)
03 - Admonitions.ipynb Info boxes, warnings, notes, and other callouts
04 - Codeblocks.ipynb Styled code blocks with syntax highlighting (light/dark mode)
05 - Mermaid.ipynb Mermaid diagrams - flowcharts, sequences, ER diagrams, and more
06 - Plantuml.ipynb PlantUML diagrams for UML and architecture
07 - C4 Plantuml.ipynb C4 architecture diagrams using PlantUML

Key Technologies

What is Diagrams as Code?

Diagrams as Code is an approach where diagrams and visualizations are defined using text-based markup languages. Benefits include:

  • Version Control - Track diagram changes alongside code
  • Consistency - Standardized styling across documentation
  • Maintainability - Easy updates without specialized tools
  • Collaboration - Review diagrams using standard code review processes
  • Reproducibility - Diagrams are always generated from source

Usage

Import these notebooks into your Databricks workspace and explore the examples. Each notebook contains:

  • Working examples you can copy and customize
  • Template code for creating your own diagrams
  • Links to official documentation

License

MIT License - feel free to use these patterns in your own projects.

About

Databricks Notebook MD Sandbox Hacks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published