Converts the data contract into an Avro schema. It supports specifying custom Avro properties for logical types and default values.
datacontract export avro datacontract.yaml --output schema.avsc
A config map on property level may include additional key-value pairs. At the moment, logicalType and default are supported.
schema:
- name: orders
properties:
- name: my_field_1
description: Example for AVRO with Timestamp (microsecond precision)
logicalType: integer
physicalType: long
examples:
- 1672534861000000 # 2023-01-01 01:01:01 in microseconds
required: true
config:
avroLogicalType: local-timestamp-micros
avroDefault: 1672534861000000
avroLogicalType — the Avro logical type of the property (here local-timestamp-micros).avroDefault — the default value for the property in Avro.