subject_level_config
Creates, updates, deletes, gets or lists a subject_level_config resource.
Overview
| Name | subject_level_config |
| Type | Resource |
| Id | confluent.schema_registry.subject_level_config |
Fields
The following fields are returned by SELECT queries:
- get_subject_level_config
The subject compatibility level.
| Name | Datatype | Description |
|---|---|---|
alias | string | If alias is specified, then this subject is an alias for the subject named by the alias. That means that any reference to this subject will be replaced by the alias. |
compatibilityGroup | string | Only schemas that belong to the same compatibility group will be checked for compatibility. |
compatibilityLevel | string | Compatibility Level (example: FULL_TRANSITIVE) |
defaultMetadata | object | Default value for the metadata to be used during schema registration. |
defaultRuleSet | object | Default value for the ruleSet to be used during schema registration. |
normalize | boolean | If true, then schemas are automatically normalized when registered or when passed during lookups. This means that clients do not have to pass the "normalize" query parameter to have normalization occur. |
overrideMetadata | object | Override value for the metadata to be used during schema registration. |
overrideRuleSet | object | Override value for the ruleSet to be used during schema registration. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_subject_level_config | select | subject | defaultToGlobal | Retrieves compatibility level, compatibility group, normalization, default metadata, and rule set for a subject. |
update_subject_level_config | replace | subject | Update compatibility level, compatibility group, normalization, default metadata, and rule set for the specified subject. On success, echoes the original request back to the client. | |
delete_subject_config | delete | subject | Deletes the specified subject-level compatibility level config and reverts to the global default. |
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 |
|---|---|---|
subject | string | Name of the subject |
defaultToGlobal | boolean | Whether to return the global compatibility level if subject compatibility level not found |
SELECT examples
- get_subject_level_config
Retrieves compatibility level, compatibility group, normalization,
default metadata, and rule set for a subject.
SELECT
alias,
compatibilityGroup,
compatibilityLevel,
defaultMetadata,
defaultRuleSet,
normalize,
overrideMetadata,
overrideRuleSet
FROM confluent.schema_registry.subject_level_config
WHERE subject = '{{ subject }}' -- required
AND defaultToGlobal = '{{ defaultToGlobal }}'
;
REPLACE examples
- update_subject_level_config
Update compatibility level, compatibility group, normalization,
default metadata, and rule set for the specified subject. On success,
echoes the original request back to the client.
REPLACE confluent.schema_registry.subject_level_config
SET
alias = '{{ alias }}',
normalize = {{ normalize }},
compatibility = '{{ compatibility }}',
compatibilityGroup = '{{ compatibilityGroup }}',
defaultMetadata = '{{ defaultMetadata }}',
overrideMetadata = '{{ overrideMetadata }}',
defaultRuleSet = '{{ defaultRuleSet }}',
overrideRuleSet = '{{ overrideRuleSet }}'
WHERE
subject = '{{ subject }}' --required
RETURNING
alias,
compatibility,
compatibilityGroup,
defaultMetadata,
defaultRuleSet,
normalize,
overrideMetadata,
overrideRuleSet;
DELETE examples
- delete_subject_config
Deletes the specified subject-level compatibility level config and reverts to the global default.
DELETE FROM confluent.schema_registry.subject_level_config
WHERE subject = '{{ subject }}' --required
;