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

Support otfMetadata in Kinesis firehose response metadata for iceberg table routing #576

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

amalakar
Copy link

Issue: #575

Add otfMetadata in metadata for firehose kinesis response record to support table routing.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -5,15 +5,25 @@
"recordId": "record1",
"result": "TRANSFORMED_STATE_OK",
"metadata": {
"partitionKeys": {}
"partitionKeys": {},
"otfMetadata": {

Choose a reason for hiding this comment

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

How does Firehose handle metadata with empty strings? Will this cause an error? IE, if I want to transform but not route, what happens?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Without knowing Firehose's behavior, it'd be prudent to add 'omitempty' to the new struct tag

const (
KinesisFirehoseOtfOperationInsert = "insert"
KinesisFirehoseOtfOperationUpdate = "update"
KinesisFirehoseOtfOperationDelete = "delete"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Expected type KinesisFirehoseOTFOperation string, like is done elsewhere for similar enum-likes in other events

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.

3 participants