Skip to main content
All CollectionsGet Started
Understanding Data Contracts: How Foundational Simplifies Automation and Enforcement
Understanding Data Contracts: How Foundational Simplifies Automation and Enforcement

Learn how to streamline data governance with data contracts in Foundational. This guide covers automating contract creation, enforcing standards, and leveraging the Open Data Contract Standard (ODCS) for seamless integration and improved data quality.

Updated over a week ago

Data contracts support is in Preview, enabled for selected customers. If you want to start using this feature, please contact Foundational Support team at support@foundational.io

Data contracts formalize the relationship between data producers and consumers, detailing expectations for structure, ownership, and SLAs.

Foundational simplifies data contracts for its customers by:

  1. Automatically creating explicit data contract definitions.

  2. Providing visibility into existing data contracts.

  3. Enforcing data contracts directly at the code level, even before changes are deployed.

Foundational’s support for the Open Data Contract Standard (ODCS) ensures compatibility with a growing ecosystem of tools, allowing users to integrate seamlessly with other ODCS-compatible solutions. Whether manually defined or generated by other tools, all ODCS-compatible contracts are supported by Foundational.

Bitol Open Data Contract Standard v3 Diagram (see: ODCS GitHub page)

Automatically Create ODCS Data Contracts Using Foundational

Creating data contracts manually can be a time-intensive process. Foundational enables you to automatically generate complete data contracts for any table or model with just one click. Here’s how it works:

  • Schema Analysis: Foundational examines the table/model structure.

  • Query History: Evaluates how frequently the table/model is updated.

  • Ownership Tracking: Identifies owners based on code history or warehouse documentation.

  • Expected Values and Volumes: Analyzes queries and metrics to determine column expectations and table size.

Once Foundational completes the generation of the data contract, you can download it, and save significant time while maintaining data contract accuracy.

Store Your Data Contracts in Code

We highly recommend storing data contract definitions in your code repositories for these key reasons:

  1. Version Control: Keep a complete history of changes to your data contracts.

  2. Code Reviews: Ensure contract updates are reviewed before implementation.

  3. Single Source of Truth: Maintain consistency with the repository as the definitive source.

This approach aligns data contracts with your existing code workflows, enhancing collaboration and traceability.

Automatic Analysis of Data Contracts

Foundational automatically detects and analyzes all ODCS-compatible data contracts in your codebase. Whether stored in a central repository or distributed across projects, the platform ensures immediate enforcement and visibility in the Foundational UI. As soon as an ODCS data contract is added or updated, Foundational begins enforcing it and displays the contract details in the interface.

Data Contracts in the Foundational UI

The Foundational UI provides an intuitive way to view data contracts associated with any table or model:

  • Select a table/model in the lineage graph or Pull Request graph.

  • Open the information panel for details about the data contract.

  • If a contract is defined for that table (even if it is defined in a different repository than the table/model) - you will see the data contract details, as well as a link to the contract definition file for quick access.

This makes it much easier for data practitioners and data leaders to quickly understand what are the expectations from each specific table.

Proactive Data Contract Enforcement

Enforcement is the cornerstone of data contracts in Foundational. The platform continuously monitors your data contracts and:

  • Prevents Violations Before Deployment: Scans pending pull requests to ensure schema, frequency, or value changes align with defined data contracts. Any mismatch is flagged, allowing developers to address the issue before merging.

  • Detects Post-Deployment Violations: Identifies violations like stale tables (i.e. data freshness is outside of its SLA) or unexpected schema changes made directly in the warehouse.

By proactively flagging violations, Foundational minimizes data quality issues and protects downstream consumers.

Notifications and Automations for Data Contracts Changes or Violations

The Policies feature in Foundational allows you to set notifications and automate actions when a data contract is violated or changed. In order to use it, just follow these steps:

  • Create a new policy

  • Configure trigger: Use either “Data contract is violated” or “Data contract is changed”

  • Apply Filters: Narrow down triggers by filtering data contracts based on the database, schema, or table name the data contract applies to.

  • Set Actions: Notify via Slack, add a reviewer to a pull request, or trigger other workflows.

This proactive approach ensures potential violations are addressed before they impact your data ecosystem.

Get Started Today!

Ready to explore data contracts? Contact Foundational Support at support@foundational.io and start leveraging this powerful feature to enhance data quality and collaboration.

Did this answer your question?