Expand description
An API client for the AWS Glue Schema Registry.
This crate is the Glue analogue of mz-ccsr, the Confluent Schema
Registry client. It is intentionally narrow: only the surface needed by
the current Materialize integration is implemented.
Read path (source decode, DDL planning, connection validation):
Client::get_registry— used byGlueSchemaRegistryConnection::validateto verify a registry exists atCREATE CONNECTIONtime.Client::get_schema_version_by_id— source decode: fetch a writer schema by the UUID embedded in each record’s Glue wire-format header.Client::get_schema_version_latest_by_name— DDL planning: pin a reader schema to the registry’s current “latest” version.
Write path (sink encode):
Client::get_schema_by_definition— reuse an already-registered definition so a sink restart does not create a duplicate version.Client::register_schema_version— add a new version to an existing schema.Client::create_schema— create a schema on first publish, setting its compatibility policy.Client::get_schema— read a schema’s compatibility to warn on a mismatch without overwriting it.
Glue has no separate get/update-compatibility API: a schema’s compatibility
is set once at Client::create_schema and read back via
Client::get_schema. This crate deliberately exposes no way to change it,
matching the sink’s set-if-unset policy.
§Example usage
use mz_aws_glue_schema_registry::{Client, ClientConfig};
use aws_types::SdkConfig;
let sdk_config: SdkConfig = unimplemented!("from AwsConnection::load_sdk_config");
let client = ClientConfig::new(sdk_config).build();
let registry = client.get_registry("my-registry").await?;Structs§
- Client
- An API client for the AWS Glue Schema Registry.
- Client
Config - Builder for
Client. - Registered
Schema Version - A schema version’s identity and lifecycle status, as returned by the write
path methods
Client::get_schema_by_definition,Client::register_schema_version, andClient::create_schema. - Registry
- A Glue Schema Registry, as returned by
Client::get_registry. - Schema
- A Glue schema’s metadata, as returned by
Client::get_schema. - Schema
Version - A Glue schema version, as returned by
Client::get_schema_version_by_idandClient::get_schema_version_latest_by_name.
Enums§
- Compatibility
- A schema’s evolution policy, as accepted by
Client::create_schemaand returned byClient::get_schema. - Create
Schema Error - Errors returned by
Client::create_schema. - Data
Format - Data format of a Glue schema.
- GetRegistry
Error - Errors returned by
Client::get_registry. - GetSchema
ByDefinition Error - Errors returned by
Client::get_schema_by_definition. - GetSchema
Error - Errors returned by
Client::get_schema. - GetSchema
Version Error - Errors returned by
Client::get_schema_version_by_idandClient::get_schema_version_latest_by_name. - Register
Schema Version Error - Errors returned by
Client::register_schema_version. - Registry
Lifecycle Status - Lifecycle status of a Glue registry.
- Schema
Lifecycle Status - Lifecycle status of a Glue schema.
- Schema
Version Lifecycle Status - Lifecycle status of a Glue schema version.