How to create data contracts

🧪 Preview feature! This feature is only available to select users for a limited period of time. The purpose of this closed preview is to allow participating users to experiment with the feature and provide valuable feedback. If you'd like to participate in the closed preview, reach out to your customer success manager for more information.

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.
💪 Did you know? You can create webhooks for data contracts and receive notifications for when a contract is added or updated to a URL of your choice.

Supported asset types

You can create data contracts for the following asset types:

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

🤓 Who can do this? Any non-guest user with edit access to an asset's metadata can create, deploy, and manage data contracts. This only includes admin and member users in Atlan.

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:

  1. From the left menu of any screen in Atlan, click Assets.
  2. (Optional) From the Filters menu on the left, click Properties and then click Has contract. Click No to filter for assets without a contract.
  3. From the Assets page, select an asset to open the asset sidebar.
  4. In the left Overview sidebar, click Add contract.
  5. 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:

  1. From the left menu of any screen in Atlan, click Assets.
  2. From the Assets page, select an asset to open the asset sidebar.
  3. From the left Overview sidebar, click View contract to navigate to the Contracts tab in the asset profile.
  4. 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.

Related articles

Was this article helpful?
2 out of 2 found this helpful