Data Contracts
Data Contracts formalize agreements between data producers and consumers, ensuring both parties have clear expectations about data quality, schema, and service levels.
What is a Data Contract?
A Data Contract is a formal specification that acts as a "terms of service" between data teams. It defines the Schema (fields and their types), establishes SLAs (freshness and availability guarantees), identifies Ownership (consumers and producers), and sets Quality Expectations for minimum standards.
Why Use Data Contracts?
For Producers
For producers, data contracts provide clear accountability for data quality and offer a documented interface for consumers. They establish a framework for change management and reduce the support burden by setting clear expectations.
For Consumers
For consumers, data contracts guarantee data freshness and provide a known, reliable schema to depend on. They ensure notification of changes and provide SLA-backed reliability.
Contract Components
Basic Information
Every contract includes basic identifiers such as the Name, a Description of its purpose and scope, and its current Status (Draft, Active, or Deprecated).
Parties
The contract explicitly defines the involved parties: the Producer (the team or system providing the data), the Consumer (the team or system using the data), and the specific Product covered by the contract.
Service Level Agreement (SLA)
SLAs define the performance guarantees, including the Freshness SLA (maximum acceptable age of data in minutes) and Availability expectations.
Schema Definition
The contract may include schema specifications that detail field names and types, distinguish between required and optional fields, and define constraints and validations.
Contract Lifecycle
Draft
This is the initial creation state where the contract is being defined and can be freely modified. It is not yet enforced or operational.
Active
This represents the operational state where the contract is in effect. SLAs are monitored, and the schema should remain stable.
Deprecated
This is the end-of-life state where the contract is no longer active and is kept only for historical reference. Consumers are expected to migrate away.
┌───────┐ ┌────────┐ ┌────────────┐
│ Draft │ ──► │ Active │ ──► │ Deprecated │
└───────┘ └────────┘ └────────────┘
Creating a Contract
From the Contracts Module
Navigate to Contracts in the sidebar and click Create Contract. Fill in the details including the name, description, associated data product, producer and consumer information, and SLA thresholds. Once complete, click Save as Draft or Activate.
From a Product
Alternatively, open a data product, navigate to the Contracts tab, and click Add Contract. The product is automatically linked to the new contract.
Contract Details View
The contract detail page provides a comprehensive view of the agreement. The Header displays the contract name, status badge, associated product link, and producer/consumer details. SLA Information shows compliance thresholds and historical metrics. The Schema section (if defined) outlines field specifications and type definitions. Finally, Activity logs recent updates, status changes, and modification history.
Managing Contracts
Editing
To modify a contract, open the detail page, click Edit, update the necessary fields, and save changes.
Active contracts should be modified carefully. Consider the impact on consumers before changing SLAs or schema.
Activating
To move a contract from draft to active, open the draft, verify all details, click Activate, and confirm the action.
Deprecating
To retire a contract, open the active contract, click Deprecate, and optionally add a deprecation note. Consumers will be notified of the status change.
Contract Monitoring
SLA Tracking
For contracts with freshness SLAs, the system monitors last update timestamps, flags breaches, and may generate alerts if thresholds are exceeded.
Compliance Dashboard
The dashboard allows you to view contract compliance across your space, showing the number of active contracts, current compliance rates, and recent breaches or warnings.
Viewing Contracts from Products
Product Contracts Tab
Each product displays its associated contracts, showing the contract name, status, producer/consumer summary, SLA thresholds, and quick navigation to details.
Multiple Contracts
A product can have multiple contracts where different consumers have different SLAs. Historical (deprecated) contracts are preserved, while active contracts are highlighted.
Best Practices
Start with Critical Data
Prioritize contracts for widely consumed data products, business-critical data flows, and data with known quality issues.
Set Realistic SLAs
Base SLAs on actual capabilities by measuring current refresh rates first. Add a reasonable buffer and aim to improve performance over time.
Include Schema
When possible, enforce schema definitions to prevent breaking changes, document interfaces clearly, and enable automated validation.
Communicate Changes
Before modifying active contracts, notify consumers in advance, provide migration guidance, and allow sufficient transition time.
Review Regularly
Periodically audit contracts to determine if SLAs are still appropriate, if the contract is still needed, or if it should be updated or deprecated.
Integration with Quality
Contracts work alongside quality management. Quality checks can validate freshness SLAs, contract breaches can trigger alerts, and compliance contributes to the overall product health.
Space Isolation
Contracts follow the platform's space isolation. They are scoped through their parent product. Viewing a contract from a different space triggers a warning, requiring you to switch to the correct space to access details.
Technical Reference
For developers and architects, see the Technical Reference for data models and API details.