Skip to content

variables

# Copyright 2026 The Bitol Contributors
# SPDX-License-Identifier: Apache-2.0

# RFC-0050 example: any string value MAY contain ${VAR_NAME} references,
# resolved at runtime by tooling. The POSIX ${VAR_NAME:-default} form supplies
# an inline default used when the variable is unset or empty.

version: 1.0.0
apiVersion: v3.2.0
kind: DataContract
id: 4c1cbb2a-1c86-4e0e-8f0e-6d7c9b1a5e42
status: active
name: orders

servers:
  - server: prod_db
    environment: prod
    type: postgresql
    host: ${DB_HOST}
    port: ${DB_PORT:-5432}
    database: ${DB_NAME:-orders}
    schema: ${DB_SCHEMA:-public}

schema:
  - name: orders
    physicalType: table
    properties:
      - name: order_id
        logicalType: string
        physicalType: varchar(36)
    quality:
      - type: sql
        query: "SELECT COUNT(*) FROM ${TARGET_TABLE} WHERE created_at > ${CUTOFF_DATE}"
        mustBe: 0
        description: Variable references are valid in any string value, including as substrings.