Skip to content

property without logicaltype

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

version: 1.0.0
kind: DataContract
id: 8f2b1c74-3d9e-4a6b-b0c5-7e1f2a3d4b5c
apiVersion: v3.2.0
status: active
name: property_without_logicaltype
description:
  purpose: >-
    `logicalType` is optional on a schema property. A contract that describes its columns with
    `physicalType` alone — the common shape when a schema is imported from DDL and the source type
    has no portable logical equivalent — must validate. Guards the regression fixed alongside this
    example, where the `logicalType: map` conditional applied to properties that declared no
    `logicalType` at all and demanded a `map` block from them.

schema:
  - name: raw_import
    physicalType: table
    description: A table described by physical types only, as a DDL import produces.
    properties:
      # No logicalType anywhere in this file. That is the whole point of the example.
      - name: order_id
        physicalType: bigint
        primaryKey: true
        primaryKeyPosition: 1
        description: Source system identifier, carried through untranslated.
      - name: vendor_specific_code
        physicalType: VARCHAR2(30)
        description: A vendor type with no portable logical equivalent.
      - name: untyped_passthrough
        description: Neither a logical nor a physical type is known for this column yet.