Data contracts
Formal Agreements for Scientific Data Exchange
Standardize the structure of scientific exchange to enable seamless reuse across research domains.
Standardize the structure of scientific exchange to enable seamless reuse across research domains.
About
Data contracts
Why contracts matter?
When contracts are shared, teams can exchange scenario inputs/outputs using their agreed upon semantics: field names, types, constraints, and references are explicit and machine-checkable.
Exchange workflows enabled
Data contracts support both bilateral exchange between trams and exchange via CROSSHub, with validation either local or platform enforced
Bilateral exchange Local validation against the agreed contract; basic quality checks; exchange via common tabular formats. |
Via CROSSHub (centralized) Automatic validation against the associated contract rules on the platform; support ingestion/export in common tabular formats. |
Works with any data model Contracts aren't limited to the CROSS data model. Any model can exchange data as long as it complies with the contract. |
What is inside a data contract?
Contracts have two main parts: metadata and schema. Metadata documents wha the dataset represents, ownership, and provenance. The schema defined the logical table structure and any existing data constraints.
Metadata | Schema |
|---|---|
Descriptive information Title and description of the dataset | Fields Column names + data types, optionally description |
Ownership and licensing Provenance of the data and rules for reusing it | Constraints Required fields, ranges and other rules for validation |
Keys and references Primary keys for uniqueness and foreign keys linking to other contracts |
Python toolkit
CROSSContract + CROSSClient
To make data contracts usable, CROSS provided a Python package with two parts: CrossContract for creating/validating contracts locally and CrossClient for interactive with the platform (retrieve contracts, create contracts, automate submissions)
CROSSContract Create contracts and validate them | CROSSClient Interact with the CROSS platform: retrieve/create contracts. |