Import Schemas

Import Schemas from source files and create destination Subjects into Destination Schema Registry.

Subjects are created on the destination keeping the schema id and the schema version.

WARNING

If the schema id already exists on the destination, Schema Registry call will fail with an error when switching to IMPORT.

cctools import schemas --help`
Command to import from source files and create destination Schemas.

Usage:
  cctools import schemas [flags]

Flags:
  -h, --help   help for schemas

Global Flags:
  -c, --config string   config file

TIP

Works with JSON files. See Export Schemas for more information.

Example input JSON file:

{
    "schema":"{\"type\":\"record\",\"name\":\"value_a1\",\"namespace\":\"com.mycorp.mynamespace\",\"fields\":[{\"name\":\"field1\",\"type\":\"string\"}]}",
    "version":19,
    "id":101010,
    "schemaType": "AVRO",
    "subject": "my-value" 
}

Configuration

Destination cluster.

destination: 
  schemaRegistry:
    endpointUrl: <SCHEMA_REGISTRY_URL>
    credentials:
      key: <USER>
      secret: <PASSWORD>

See Configuration