schema:
  type: object
  title: change_reasons
  version: "1.0.0"
  properties:
    metadata:
      additionalProperties: true
      description: Metadata when the record is processed
      title: Metadata
      type: object
    code:
      description: Change reason code identifier
      examples:
      - COMM
      - OPSN
      - TECH
      maxLength: 5
      title: Code
      type: string
      coercion: coerce_to_string
      validations:
        max_length:
          threshold: 5
        non_empty_string: null
    carrier:
      description: Carrier code (use '*' for all carriers)
      examples:
      - '*'
      - CX
      - KA
      maxLength: 3
      title: Carrier
      type: string
      coercion: coerce_to_string
      validations:
        max_length:
          threshold: 3
        non_empty_string: null
    description:
      anyOf:
      - maxLength: 80
        type: string
      - type: 'null'
      default: null
      description: Description of the change reason
      title: Description
      coercion: coerce_to_nullable_string
      validations:
        max_length:
          threshold: 80
    record_id:
      description: Record ID
      title: Record Id
      type: integer
      coercion: coerce_to_integer
    last_update:
      description: Timestamp of last update
      format: date-time
      title: Last Update
      type: string
      coercion: coerce_to_datetime
  required:
  - metadata
  - code
  - carrier
  - record_id
  - last_update
metadata:
  title: change_reasons
  version: "1.0.0"
  status: active
  type: object
  description: Default metadata for change_reasons
  validation_title: change_reasons
  created_at: '2025-11-26T08:53:19.766Z'
  updated_at: '2025-11-26T08:53:19.766Z'
  created_by: IOC DE
  updated_by: IOC DE
  data_feed_association:
    - title: change_reasons
      type: Operational
  pulls_from:
    - "NetlineOpsReplica"
  pushes_to:
    - "Fleetwise"
  system_sources:
    - "NetlineBase"
  dependencies:
    - "AircraftType"
    - "Operator"
    - "Airport"
  # Ownership - references owner IDs from owners table
  # These will be stored in join tables: metadata_record_business_owners, etc.
  business_owners:
    - operations-team
  bu_sme: []
  it_application_owners: []
  it_sme: []
  domain: "NetlineOps configuration"
  data_quality:
    accuracy: 0.0
    monitoring_enabled: false
    sla: null
  governance_rules:
    data_retention:
      days: 2555
      reason: Regulatory compliance for change reason records
    pii_fields:
      fields: []
    sensitivity: Internal
    access_control:
      read:
        - operations-team
        - data-team
      write:
        - operations-team
  changelog:
    - version: 1.0.0
      date: '2025-11-10T00:00:00.000+00:00'
      author: IOC DE
      type: initial
      changes:
        - 'Initial metadata collected from upstream for: change_reasons'
  ownership:
    owner: operations-team
    team: data-engineering
    additional_info: {}
coercion_rules:
  version: "1.0.0"
  rules:
    code: coerce_to_string
    carrier: coerce_to_string
    description: coerce_to_nullable_string
    record_id: coerce_to_integer
    last_update: coerce_to_datetime
validation_rules:
  version: "1.0.0"
  rules:
    code:
      max_length:
        threshold: 5
      non_empty_string: null
    carrier:
      max_length:
        threshold: 3
      non_empty_string: null
    description:
      max_length:
        threshold: 80
    record_id:
      greater_than_or_equal_to:
        threshold: 0
versions:
  schema: 1.0.0
  coercion_rules: 1.0.0
  validation_rules: 1.0.0
  metadata: 1.0.0

