> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Creating Data Contracts | OpenMetadata Data Contracts Guide

> Create open-source data contracts directly in the OpenMetadata UI

# Create Data Contract

Data contracts are currently available for tables ingested into OpenMetadata. The following guide shows how a data contract was created for a snowflake.DEMO\_STAGE.JAFFLE\_SHOP.CUSTOMERS table.

To create a Data Contract for a Table in OpenMetadata:

* Go to the Table's page, select **Contract**, then **+ Add Contract**

<img src="https://mintcdn.com/openmetadata/W-h7zy_HSORZDwGK/public/images/how-to-guides/contracts/create1.png?fit=max&auto=format&n=W-h7zy_HSORZDwGK&q=85&s=28f4d7cdb7e0092831b91ec084e96eb4" alt="Adding a Data Contract to an OpenMetadata Table" width="3410" height="1147" data-path="public/images/how-to-guides/contracts/create1.png" />

* In *Contract Details*, be sure to give your new data contract a name. Optionally, you can assign Owners and provide a description of your data contract. Then select **Schema**.

<img src="https://mintcdn.com/openmetadata/W-h7zy_HSORZDwGK/public/images/how-to-guides/contracts/create2.png?fit=max&auto=format&n=W-h7zy_HSORZDwGK&q=85&s=373a46630d7e420b91c6212bf849b75a" alt="Adding Contract Details" width="3410" height="1772" data-path="public/images/how-to-guides/contracts/create2.png" />

* Select the columns of your table that you would like to add to your new data contract, or select all columns by checking the box at the top right. Then select **Semantics**

<img src="https://mintcdn.com/openmetadata/W-h7zy_HSORZDwGK/public/images/how-to-guides/contracts/create3.png?fit=max&auto=format&n=W-h7zy_HSORZDwGK&q=85&s=185b1aff721c19dd51d135387f002cd4" alt="Selecting a schema for an OpenMetadata Data Contract" width="3406" height="1812" data-path="public/images/how-to-guides/contracts/create3.png" />

* Add the business rules you would like to enforce in *Semantics*. For OpenMetadata Tables, rules can be created for:
  * Service
  * Owners
  * Display Name
  * Name
  * Description
  * Tags
  * Domain
  * Data Product
  * Tier

<img src="https://mintcdn.com/openmetadata/W-h7zy_HSORZDwGK/public/images/how-to-guides/contracts/create4.png?fit=max&auto=format&n=W-h7zy_HSORZDwGK&q=85&s=f378af75abc6dd5429304b38c0a04e00" alt="Adding rules to an OpenMetadata Data Contract" width="3410" height="1701" data-path="public/images/how-to-guides/contracts/create4.png" />

* Once a rule is created, you can **+ Add New Rule** to create more, or select **Quality**

<img src="https://mintcdn.com/openmetadata/W-h7zy_HSORZDwGK/public/images/how-to-guides/contracts/create5.png?fit=max&auto=format&n=W-h7zy_HSORZDwGK&q=85&s=3802bde0bcaecfeaf1b5d324dc13de73" alt="Adding more rules to an OpenMetadata Data Contract" width="3399" height="1618" data-path="public/images/how-to-guides/contracts/create5.png" />

* Select **+ Add Test** to add a [Data Quality Test](https://docs.open-metadata.org/latest/how-to-guides/data-quality-observability/quality/test) or tests to your new contract, then select **Save**

<img src="https://mintcdn.com/openmetadata/W-h7zy_HSORZDwGK/public/images/how-to-guides/contracts/create6.png?fit=max&auto=format&n=W-h7zy_HSORZDwGK&q=85&s=5af6a7cf558b42c9fc0aced3f1cebaf7" alt="Adding data quality tests to an OpenMetadata Data Contract" width="3397" height="1617" data-path="public/images/how-to-guides/contracts/create6.png" />

* Once your new data contract has been created successfully, you can run it by selecting **> Run now**

<img src="https://mintcdn.com/openmetadata/usv6AmywY-JYXAIG/public/images/how-to-guides/contracts/create7.png?fit=max&auto=format&n=usv6AmywY-JYXAIG&q=85&s=3b83083ad6595c869376623b9993059e" alt="Running an OpenMetadata Data Contract" width="3410" height="1821" data-path="public/images/how-to-guides/contracts/create7.png" />
