A data contract is an agreement between a data producer and consumer that specifies requirements for generating and using high-quality, reliable data. As a powerful tool for data management, data contracts can help you standardize contractual obligations between data producers and consumers, organize your assets with embeddable contract metadata, and enforce them with data quality rules.
In Atlan, you can directly add a data contract to supported assets and provide helpful context to your downstream users.
For a data contract to help build trust in your assets, it should be:
- Templatized and easily comprehensible — use Atlan's YAML contract template to create standardized contracts and push to Atlan.
- Version-controlled — continuously validate and monitor your data contracts either in runtime or real-time.
- Embeddable — embed the contract as metadata for a supported asset.
- Enforceable — enforce your contracts with data quality rules.
- Extensible — identify new specifications, generate new versions, and then compare and contrast them.
Supported asset types
You can create data contracts for the following asset types:
- Tables
- Views
- Materialized views
- Output port assets of data products
Supported asset metadata
Atlan maps the following asset metadata properties to it contract properties:
Metadata property | Contract property |
---|---|
name |
dataset |
typeName |
type |
userDescription or description
|
description |
ownerUsers |
owner.users |
ownerGroups |
owners.groups |
certificateStatus |
certification.status |
certificateStatusMessage |
certification.message |
announcementType |
announcement.type |
announcementTitle |
announcement.title |
announcementMessage |
announcement.description |
meaningNames |
terms |
classificationDef.displayName |
tags.name |
classifications.propagate |
tags.propagate |
classifications.restrict_propagation_through_lineage |
tags.restrict_propagation_through_lineage |
classifications.restrict_propagation_through_hierarchy |
tags.restrict_propagation_through_hierarchy |
column.name |
columns.name |
column.userDescription or column.description
|
columns.description |
column.dataType |
columns.data_type |
custom metadata (CM) | custom_metadata.<CM> |
Add a data contract to an asset
To add a data contract to an asset, you can either:
- Create a contract directly in Atlan from the Contracts tab of the asset profile. You can create and maintain data contracts as easily as editing a word document.
- Use Atlan CLI to import an existing contract from your local machine to Atlan directly or through a CI/CD pipeline. Atlan CLI is a command-line tool that you can download directly from Atlan to your local machine to create and push data contracts to Atlan. Once you have published the contract, you can also sync metadata from a contract to the governed asset in Atlan.
Once created, you will be able to monitor and manage your data contracts in Atlan.
Â
To add a data contract:
- From the left menu of any screen in Atlan, click Assets.
- (Optional) From the Filters menu on the left, click Properties and then click Has contract. Click No to filter for assets without a contract.
- From the Assets page, select an asset to open the asset sidebar.
- In the left Overview sidebar, click Add contract.
- In the Contract tab of the asset profile, you can either:
- Click Create contract to create a draft contract directly in Atlan based on asset metadata.
- Click Import contract to use Atlan CLI to import an existing contract from your local environment to Atlan. You will first need to install and connect Atlan CLI and then push the contract to Atlan. Refer to our developer documentation to complete the steps.
Congrats on adding a data contract in Atlan! 🎉
View a data contract
To view a data contract:
- From the left menu of any screen in Atlan, click Assets.
- From the Assets page, select an asset to open the asset sidebar.
- From the left Overview sidebar, click View contract to navigate to the Contracts tab in the asset profile.
- In the Contract tab, you can view the contract specifications for your asset in a YAML format:
- Next to Specifications, click the version button to view the latest version of the contract. Click Compare older versions to compare them Side by side or in an Overlay layout.
- Click the pencil icon to edit the contract.
- Click the clipboard icon to copy the YAML code.
- Under Timeline, view a timeline for the evolution of your contract.
- Under Summary, view details of who last updated your contract and when.