Markdown Editor

Data Contract Template (ODCS)

Producer-consumer data contract: owner, schema, quality rules, SLAs, access, breaking-change policy, YAML skeleton

AI 및 데이터표준Open Data Contract Standard (ODCS), Bitol projectdatacontract

사용법: Use when a dataset or data product has consumers outside the producing team. Agree the schema meanings and service levels with the main consumers first. The main pitfall is unannounced breaking changes; follow the change policy and keep the YAML in sync.

미리보기

Data Contract: [Dataset or data product name] [version]

Agreement between the producer of a dataset and its consumers: who owns it, what the schema means, which quality rules and service levels it guarantees, who may access it, and how it may change. The concepts follow the Open Data Contract Standard (ODCS) maintained by the Bitol project, so the contract can also be kept as a machine-readable YAML file. Replace every [bracketed] value and every row marked Example.

FieldValue
Contract ID[dc-orders-001]
Data product / dataset[Name]
Contract version[1.2.0]
Status[Proposed / Active / Deprecated / Retired]
Domain[Business domain, for example Sales]
Producer owner[@producer-owner], [team]
Data steward[@steward]
Physical location[Platform, database, schema and table, or topic]
Effective fromYYYY-MM-DD
Last updatedYYYY-MM-DD

1. Fundamentals

1.1 Purpose

[Example: "One row per confirmed customer order, used for revenue reporting, demand forecasting and customer analytics."]

1.2 Usage and limitations

ItemDescription
Intended usesExample: Daily revenue reporting; forecasting models; cohort analysis
Not suitable forExample: Real-time fraud decisions (data is up to 1 hour old); financial statutory reporting (use the ledger)
Known limitationsExample: Orders before 2022-01-01 lack channel; marketplace orders arrive up to 24 hours late

2. Schema

Table: [sales.orders]. Grain: one row per order.

ColumnLogical typePhysical typeRequiredKeyClassificationDescriptionExample
order_idstringVARCHAR(20)YesPrimary, uniqueInternalOrder identifier from the order serviceORD-2026-0048213
customer_idstringVARCHAR(20)YesForeign key to customersPersonal (pseudonymous)Customer identifierCUS-778120
order_tstimestampTIMESTAMP_TZYesInternalTime the order was confirmed, UTC2026-10-14T09:12:44Z
channelstringVARCHAR(10)NoInternalOne of web, app, store, marketplace; null before 2022app
net_amountdecimalNUMBER(12,2)YesConfidentialOrder value after discounts, before tax and shipping, in currency84.50
currencystringCHAR(3)YesInternalISO 4217 codeEUR
statusstringVARCHAR(12)YesInternalOne of confirmed, shipped, delivered, cancelled, returnedshipped
[column][type][physical type][Yes / No][Key][Class][Description][Example]

3. Data quality rules

IDDimensionRuleThresholdCheckOn failure
DQ-01Uniquenessorder_id is unique100%Test in pipeline, every loadBlock publish; page producer
DQ-02Completenesscustomer_id not null100%Every loadBlock publish
DQ-03Validitycurrency in the allowed ISO 4217 list100%Every loadQuarantine rows; alert
DQ-04AccuracyDaily sum of net_amount matches the order service within toleranceDifference at most 0.1%Daily reconciliation jobAlert producer; mark day as provisional
DQ-05VolumeDaily row count within expected range50% to 200% of 28-day medianEvery loadAlert; consumers notified
[DQ-nn][Dimension][Rule][Threshold][Check][Action]

4. Service levels

PropertyCommitmentMeasured asPeriod
Freshness (latency)Example: Data no older than 60 minutesNow minus max order_ts loadedChecked every 15 min
AvailabilityExample: 99.5% of hours queryableSuccessful synthetic query per hourMonthly
Late dataExample: Marketplace orders complete within 24 hoursReconciliationDaily
RetentionExample: 7 yearsPartition lifecycle policyContinuous
Support responseExample: Incident acknowledged within 1 business hourTicket timestampsMonthly
[Property][Commitment][Measure][Period]

5. Access and security

ItemRule
Access requestExample: Through [access portal], approved by the data steward
RolesExample: orders_reader for all columns except net_amount; orders_finance for all columns
Personal data handlingExample: customer_id is pseudonymous; joining to identity tables requires a privacy-approved purpose
MaskingExample: net_amount masked for non-finance roles
Legal basis and purposes[Reference to records of processing]
AuditExample: Query logs retained 1 year

6. Consumers

ConsumerTeamUseColumns usedContactCriticality
Example: Revenue dashboardFinance analyticsDaily revenueAll[@name]High
Example: Demand forecast modelData scienceTraining featuresorder_ts, channel, net_amount[@name]High
[Consumer][Team][Use][Columns][@name][H / M / L]

7. Change management and breaking-change policy

Versions follow semantic versioning:

  • Major (breaking): removing or renaming a column, changing a type or meaning, changing the grain, tightening a nullable column to drop rows, lowering a service level.
  • Minor (compatible): adding a nullable column, adding an allowed value with notice, improving a service level.
  • Patch: description fixes, documentation only.
RulePolicy
Notice for breaking changeExample: 30 days to all registered consumers
Parallel runExample: Old and new versions published side by side for at least 30 days
ApprovalExample: Producer owner and data steward; consumers with High criticality must acknowledge
Emergency changeExample: Allowed for security or legal reasons; consumers notified within 1 hour

8. Support

ChannelUseHours
[Team chat channel]QuestionsBusiness hours
[Issue tracker or queue]Data issues and change requestsBusiness hours
[On-call rota]Incidents breaching section 424 x 7 for High criticality consumers

9. Change log

VersionDateAuthorChangeType
1.0.0YYYY-MM-DD[@name]Example: First active contractn/a
1.1.0YYYY-MM-DD[@name]Example: Added nullable channel columnMinor
1.2.0YYYY-MM-DD[@name]Example: Freshness improved from 3 hours to 60 minutesMinor
[x.y.z]YYYY-MM-DD[@name][Change][Major / Minor / Patch]

10. Machine-readable contract (YAML skeleton)

The skeleton below mirrors sections 1 to 8 in a YAML layout inspired by the Open Data Contract Standard. Validate the real file against the ODCS version you adopt.

apiVersion: v3.0.0          # ODCS version adopted
kind: DataContract
id: dc-orders-001
name: orders
version: 1.2.0
status: active
domain: sales
description:
  purpose: One row per confirmed customer order for reporting and forecasting.
  limitations: Marketplace orders may arrive up to 24 hours late.
schema:
  - name: orders
    physicalName: sales.orders
    properties:
      - name: order_id
        logicalType: string
        physicalType: VARCHAR(20)
        required: true
        primaryKey: true
        unique: true
      - name: net_amount
        logicalType: number
        physicalType: NUMBER(12,2)
        required: true
        classification: confidential
    quality:
      - rule: rowCount
        description: Daily volume within 50% to 200% of the 28-day median
slaProperties:
  - property: latency
    value: 60
    unit: minutes
  - property: availability
    value: 99.5
    unit: percent
team:
  - username: producer-owner
    role: owner
support:
  - channel: "#orders-data"
    tool: chat

Standard and licence note

Concepts aligned with the Open Data Contract Standard (ODCS) published by the Bitol project (bitol-io/open-data-contract-standard, a Linux Foundation AI and Data project). Only concept and field names are used; this template is original text written for this collection and copies no text from the specification. Template licence: MIT.

관련 템플릿