kafka_schema_version
Creates, updates, deletes, gets or lists a kafka_schema_version
resource.
Overview
Name | kafka_schema_version |
Type | Resource |
Id | digitalocean.databases.kafka_schema_version |
Fields
The following fields are returned by SELECT
queries:
- databases_get_kafka_schema_version
A JSON object.
Name | Datatype | Description |
---|---|---|
schema_id | integer | The id for schema. |
subject_name | string | The name of the schema subject. (example: customer-schema) |
schema | string | The schema definition in the specified format. (example: { "type": "record", "name": "Customer", "fields": [ {"name": "id", "type": "int"}, {"name": "name", "type": "string"} ] } ) |
schema_type | string | The type of the schema. (example: AVRO) |
version | string | The version of the schema. (example: 1) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
databases_get_kafka_schema_version | select | database_cluster_uuid , subject_name , version | To get a specific schema by subject name for a Kafka cluster, send a GET request to/v2/databases/$DATABASE_ID/schema-registry/$SUBJECT_NAME/versions/$VERSION . |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
database_cluster_uuid | string (uuid) | A unique identifier for a database cluster. (example: 9cc10173-e9ea-4176-9dbc-a4cee4c4ff30) |
subject_name | string | The name of the Kafka schema subject. (example: customer-schema) |
version | string | The version of the Kafka schema subject. (example: 1) |
SELECT
examples
- databases_get_kafka_schema_version
To get a specific schema by subject name for a Kafka cluster, send a GET request to/v2/databases/$DATABASE_ID/schema-registry/$SUBJECT_NAME/versions/$VERSION
.
SELECT
schema_id,
subject_name,
schema,
schema_type,
version
FROM digitalocean.databases.kafka_schema_version
WHERE database_cluster_uuid = '{{ database_cluster_uuid }}' -- required
AND subject_name = '{{ subject_name }}' -- required
AND version = '{{ version }}' -- required;