Skip to content

firehose support dynamic partitioning #395

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

Merged
merged 7 commits into from
Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions events/firehose.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,14 @@ type KinesisFirehoseResponse struct {
}

type KinesisFirehoseResponseRecord struct {
RecordID string `json:"recordId"`
Result string `json:"result"` // The status of the transformation. May be TransformedStateOk, TransformedStateDropped or TransformedStateProcessingFailed
Data []byte `json:"data"`
RecordID string `json:"recordId"`
Result string `json:"result"` // The status of the transformation. May be TransformedStateOk, TransformedStateDropped or TransformedStateProcessingFailed
Data []byte `json:"data"`
Metadata KinesisFirehoseResponseRecordMetadata `json:"metadata"`
}

type KinesisFirehoseResponseRecordMetadata struct {
PartitionKeys map[string]string `json:"partitionKeys"`
}

type KinesisFirehoseRecordMetadata struct {
Expand Down
21 changes: 19 additions & 2 deletions events/testdata/kinesis-firehose-response.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,29 @@
{
"data": "SGVsbG8gV29ybGQ=",
"recordId": "record1",
"result": "TRANSFORMED_STATE_OK"
"result": "TRANSFORMED_STATE_OK",
"metadata": {
"partitionKeys": {}
}
},
{
"data": "SGVsbG8gV29ybGQ=",
"recordId": "record2",
"result": "TRANSFORMED_STATE_DROPPED"
"result": "TRANSFORMED_STATE_DROPPED",
"metadata": {
"partitionKeys": {}
}
},
{
"data": "SGVsbG8gV29ybGQ=",
"recordId": "record3",
"result": "TransformedStateOk",
"metadata": {
"partitionKeys": {
"iamKey1": "iamValue1",
"iamKey2": "iamValue2"
}
}
}
]
}