Skip to main content
Contract rules are not yet implemented in the current version of DriftGuard. The severity scoring described in this section reflects planned behaviour. Today, all checks use the default scoring logic regardless of any rules you define. See Severity Levels for the current fixed scoring formula.

Rules will let you customise how DriftGuard evaluates schema changes on a per-contract basis. Once implemented, you’ll set them in the schema object when creating a contract.

Planned Rules

{
  "rules": {
    "allow_additional_columns": false,
    "treat_renames_as_breaking": true
  }
}
RuleTypePlanned DefaultDescription
allow_additional_columnsbooleanfalseIf true, new columns in the incoming schema will not contribute to the severity score. If false, each new column adds +5 points.
treat_renames_as_breakingbooleantrueIf true, a detected rename is treated as a removal (+40) plus an addition (+5). If false, it adds fewer points.

Planned Rule Behaviour

Strict Contract (Planned Default)

Recommended for production tables where any unexpected change should be flagged:
{
  "rules": {
    "allow_additional_columns": false,
    "treat_renames_as_breaking": true
  }
}
  • New columns → contribute +5 points each toward severity
  • Renames → treated as a removal + addition, pushing toward breaking

Flexible Contract

Recommended for partner feeds or raw ingestion layers where extra columns are expected and acceptable:
{
  "rules": {
    "allow_additional_columns": true,
    "treat_renames_as_breaking": false
  }
}
  • New columns → ignored, no severity points added
  • Renames → treated more leniently
{
  "rules": {
    "allow_additional_columns": false,
    "treat_renames_as_breaking": true
  }
}
dbt model outputs should be fully predictable. Any unexpected column addition or rename should contribute to severity scoring.

Current Behaviour (No Rules)

Until rules are implemented, all checks use this fixed scoring formula regardless of contract configuration:
Change TypePoints
Required column removed+40
Optional column removed+20
Column type changed+30 per column
New column added+5 per column
Score capped at100
See Severity Levels for how the score maps to pass, warning, and breaking.
Per-column severity overrides are also on the roadmap — this will let you mark specific columns as ignore, warning-only, or breaking-only regardless of change type.
Want to be notified when rules go live? Watch the Changelog or follow @naveenbale on X.

Severity Levels

See the current fixed severity scoring formula in full detail.

Create Contract

Create a contract with the current supported fields.