Skip to main content
← Back to index page

🗂️ Diagram Views in DBML

We're excited to introduce DiagramView-as-code — a new way to define diagram views directly in your DBML code, with no UI action needed.

Your view settings now live right alongside your schema in DBML. This means your views are version-controlled alongside your schema changes, making it easy to automate documentation and share consistent view configurations across your team.

What's new:

  • Define a default view to persist your filter settings in code
  • Create named views for stakeholders: DiagramView "Sales Team", DiagramView Engineering
  • All diagram view filtering — work the same whether set via UI or DBML

Example:

DiagramView "Sales Team" {
Tables {
customers
orders
products
}
TableGroups { sales }
}

DiagramView Engineering {
Tables {
users
sessions
events
}
Schemas { core analytics }
}

Note: Named views (DiagramView <name>) are available on our paid plans. Free users can only filter tables within the default view (DiagramView Default).

📚 Learn more →

Please give this feature a try and let us know what you think.