Model Validation

Model Validation lets you define rules that your schema must satisfy — and then run them to find every table, column, index, or foreign key that breaks a rule. Use it to enforce naming conventions, data governance policies, or any design standard your team follows.

Examples of things you can validate:

  • All table names match a specific naming pattern (e.g. snake_case, no spaces).
  • Every table has a primary key.
  • Every column has a description.
  • No column uses a deprecated data type.

Opening the Validation Dialog

Open the dialog from Model → Model Validation.

Model Validation dialog

Adding Validators

Each validator is a sequence of steps. Click Add to add a step — each step is one of three types:

  • Operation — selects what to iterate over: tables, columns, foreign keys, indexes, etc.
  • Filter — a condition that must be true before the check is applied (e.g. "only tables whose name starts with tmp_").
  • Check — the condition that must be met. If it fails, the item is flagged.
Add a filter or check to the validator

For complex checks that go beyond the built-in conditions, choose Java Groovy Check and write custom Java/Groovy code. The code receives a variable called unit which represents the current schema object being tested — a table, column, foreign key, index, etc. depending on which operation is active. You can access any property of unit and return true (passes) or false (fails).

Running Validation

Click Validate to run all validators against the current model. The results panel lists every schema item that failed at least one check, along with the rule it violated. Click any result to navigate directly to the failing object in the diagram.