Data Contract

orders-unit-test

Info

Information about the data contract

Title
Orders Unit Test
Version
1.0.0
Status
active
Description
The orders data contract
Owner
checkout
otherField
otherValue

Servers

Servers of the data contract

  • Server
    production
    Environment
    production
    Type
    snowflake
    Account
    my-account
    Database
    my-database
    Schema
    my-schema

Terms

Terms and conditions of the data contract

Usage
This data contract serves to demo datacontract CLI export.
Limitations
Not intended to use in production
Billing
free
Notice Period
P3M

Data Model

The logical data model

Webshop Orders orders table
The orders model
customModelProperty1: customModelProperty1Value
Order ID
order_id
varchar
No description
Examples: B12345678, B12345679
required unique minLength:8 maxLength:10 pattern:^B[0-9]+$ sensitive PII customFieldProperty1:customFieldProperty1Value
order_total
bigint
The order_total field
required maximum:1000000
Quality | SQL: 95% of all order total values are expected to be between 10 and 499 EUR.
Query:
SELECT quantile_cont(order_total, 0.95) AS percentile_95
FROM orders
Must Be Between: 1000 and 49900
order_status
text
No description
Enum: pending, shipped, delivered
required
Quality | SQL: Row Count
Query:
SELECT COUNT(*) AS row_count
FROM orders
Must Be Greater Than: 1000
Primary Key: ['order_id', 'order_status']

Definitions

Domain specific definitions in the data contract

customer_id
Unique identifier for the customer.
Customer ID
customer_id
string
Unique identifier for the customer.
Examples: acbd1a47-9dca-4cb8-893e-87aa0aa0f243, 5742637f-bb8b-4f0c-8ed1-afb1a91300a9
format:uuid
Created at 02 Feb 2025 18:36:28 UTC with Data Contract CLI v0.10.20
dataContractSpecification: 1.1.0
id: orders-unit-test
info:
  title: Orders Unit Test
  version: 1.0.0
  status: active
  description: The orders data contract
  owner: checkout
  contact:
    url: https://wiki.example.com/teams/checkout
    email: [email protected]
  otherField: otherValue
servers:
  production:
    type: snowflake
    environment: production
    account: my-account
    database: my-database
    schema: my-schema
    roles:
    - name: analyst_us
      description: Access to the data for US region
terms:
  usage: This data contract serves to demo datacontract CLI export.
  limitations: Not intended to use in production
  billing: free
  noticePeriod: P3M
models:
  orders:
    description: The orders model
    type: table
    title: Webshop Orders
    fields:
      order_id:
        title: Order ID
        type: varchar
        required: true
        unique: true
        pii: true
        classification: sensitive
        pattern: ^B[0-9]+$
        minLength: 8
        maxLength: 10
        tags:
        - order_id
        examples:
        - B12345678
        - B12345679
        customFieldProperty1: customFieldProperty1Value
      order_total:
        type: bigint
        required: true
        description: The order_total field
        minimum: 0
        maximum: 1000000
        quality:
        - type: sql
          description: 95% of all order total values are expected to be between 10
            and 499 EUR.
          query: 'SELECT quantile_cont(order_total, 0.95) AS percentile_95

            FROM orders

            '
          mustBeBetween:
          - 1000
          - 49900
      order_status:
        type: text
        required: true
        enum:
        - pending
        - shipped
        - delivered
    quality:
    - type: sql
      description: Row Count
      query: 'SELECT COUNT(*) AS row_count

        FROM orders

        '
      mustBeGreaterThan: 1000
    primaryKey:
    - order_id
    - order_status
    customModelProperty1: customModelProperty1Value
definitions:
  customer_id:
    title: Customer ID
    description: Unique identifier for the customer.
    type: string
    format: uuid
    tags:
    - features
    - pii
    examples:
    - acbd1a47-9dca-4cb8-893e-87aa0aa0f243
    - 5742637f-bb8b-4f0c-8ed1-afb1a91300a9