Skip to content
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

feat: Add topic-partition-key record grouper #200

Merged
merged 4 commits into from
Oct 6, 2023
Merged

Conversation

jeqo
Copy link
Contributor

@jeqo jeqo commented Sep 25, 2023

Closes #198

This PR includes a changelog record grouper by topic partition and key.

To cope with field requirement, users can move a field to the key using SMT:

    "file.name.template": "{{topic}}-{{partition:padding=true}}/user-id={{key}}/{{start_offset:padding=true}}.jsonl",

    "transforms": "createKey,extractInt",
    "transforms.createKey.type": "org.apache.kafka.connect.transforms.ValueToKey",
    "transforms.createKey.fields": "user_id",
    "transforms.extractInt.type": "org.apache.kafka.connect.transforms.ExtractField$Key",
    "transforms.extractInt.field": "user_id"

So it is not needed for the grouper to deal with record fields.

@jeqo jeqo marked this pull request as ready for review September 26, 2023 04:57
@jeqo jeqo requested a review from jjaakola-aiven September 26, 2023 04:57
Copy link
Contributor

@jjaakola-aiven jjaakola-aiven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits to clean.

@jeqo jeqo requested a review from jjaakola-aiven October 4, 2023 09:10
@jjaakola-aiven jjaakola-aiven merged commit c75bf4a into main Oct 6, 2023
@jjaakola-aiven jjaakola-aiven deleted the jeqo/tpk-grouper branch October 6, 2023 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add changelog record grouping by field
2 participants