Skip to main content
← Back to index page

πŸ’½ Data Sample

Great news! We're introducing Data Sample β€” a feature that lets you add example data rows directly alongside your table definitions in DBML. Now your diagrams can show not just schema, but actual data, making them far more meaningful and useful for team communication.

Here's a simple DBML example:

Table plans {
id int [pk]
name varchar
price decimal

Records {
1, 'Free', 0
2, 'Pro', 8
3, 'Team', 15
}
}

Define sample data right in DBML, and your diagram instantly comes alive. You can import SQL INSERT INTO statements to auto-populate records, view them in the diagram with a single click, and export back to SQL for database seeding. This keeps your reference data and schema definitions in perfect sync across docs and deployment.



Why it matters:

  • Your diagrams explain themselves β€” team members see actual data shapes and values, not just column definitions.
  • Lookup tables finally have a home β€” define plans, roles, and other reference tables with their data, all in one place.
  • Catch schema problems early β€” real data reveals missing columns, type mismatches, and broken relationships before migration.
  • Convert existing data seamlessly β€” import SQL statements and auto-convert to Records for instant visualization.
  • Seed your database faster β€” export sample data to SQL and deploy immediately.

Note:Β Data Sample is available on all plans.

πŸ“š Read the full syntax docs β†’

Try it out and let us know what you think!