Skip to main content

Data Contract Builder

v1.0.0

Data Contract YAML scaffold — producer, consumer, schema, SLAs, terms, versioning.

Data Contract YAML
# Data Contract Specification (datacontract.com)

dataContractSpecification:
"0.9.3"

id:
"urn:datacontract:backend:platform:orders"

info:
"title": "orders data contract",
    "version": "1.0.0",
    "owner": "backend-platform",
    "contact": {
      "email": "backend-platform@example.com"
    }

terms:
"usage": "Internal use by listed consumers only",
    "limitations": "SLA: 1 hour freshness"

models:
"orders": {
      "type": "table",
      "fields": {
        "order_id": {
          "type": "string",
          "required": true
        },
        "customer_id": {
          "type": "string",
          "required": true
        },
        "total": {
          "type": "decimal",
          "required": true
        },
        "created_at": {
          "type": "timestamp",
          "required": true
        },
        "status": {
          "type": "string",
          "required": true
        }
      }
    }

servicelevels:
"freshness": {
      "description": "Data is updated every 1 hour",
      "threshold": "1 hour"
    }

consumers:
[
    {
      "team": "analytics-team"
    },
    {
      "team": "billing-service"
    }
  ]

# Validate: datacontract-cli test datacontract.yaml
# Lint: datacontract-cli lint datacontract.yaml