-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: re-allow empty pk.fields
for some pk.mode
#360
fix: re-allow empty pk.fields
for some pk.mode
#360
Conversation
Test setup
Create Kafka topic
Create Avro schemas in Karapace Schema Registry:
Produce Avro record through Karapace REST:
Create connector using all message key fields as PK:
Verify that a table is created with all message key fields as PK:
|
Recently added validations (see PR Aiven-Open#335) are preventing the support of schema evolution use-cases, e.g. Documentation: ``` If 'pk.mode' is 'record_key' and 'pk.fields' is empty, then all fields from the key struct will be used. ``` Configuration: ``` "pk.mode": "record_key", "auto.create": "true", "auto.evolve": "true", ``` Validation rule: ``` Primary key fields must be set when pkMode is 'record_key'. ``` The purpose of this PR is to re-enable this feature for both `record_key` and `record_value` modes.
91e2711
to
a20df4d
Compare
Create another connector using all message value fields as PK:
Verify that a table is created with all message key fields as PK:
|
pk.fields
with pk.mode
set to record_key
pk.fields
for some pk.mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Recently added validations (see PR #335) are preventing the support of schema evolution use-cases, e.g.
Documentation:
Configuration:
Validation rule:
The purpose of this PR is to re-enable this feature for
record_key
mode.