Skip to content

Feature request: Kinesis Firehose Response Record data class #2440

Closed
@troyswanson

Description

@troyswanson

Use case

Constructing response objects for use in Kinesis Firehose transformation functions.

This is a continuation of #1059 which describes the event object as well as the response object. The implementation for that issue can be found at #1540, but that does not include the response object.

Solution/User Experience

A data class that can be populated during the execution of a function that will be properly formed as a response to a KinesisFirehoseEvent invocation.

Rough idea

KinesisFirehoseResponse:
   records: list[KinssisFirehoseResponseRecord]
KinesisFirehoseResponseRecord:
   record_id: str
   result: Literal["Ok", "ProcessingFailed"]
   data: bytes
   metadata: KinesisFirehoseResponseRecordMetadata
KinesisFirehoseResponseRecordMetadata:
   partition_keys: dict

Note: ☝🏼 I'm not sure if this is not an exhaustive list of options that can be returned

Alternative solutions

Previously, I've used basic dictionaries for this, but it would be nice to have a more structured data class to use.

The Go example in the Dynamic Partitioning in Kinesis Data Firehose has the concept of a KinesisFirehoseResponse in their events package.

I believe it would be possible to re-use the KinesisFirehoseEvent data class from the utilities.data_classes module, but this seems like it is more geared for the event invocation object as opposed to the response object.

Acknowledgment

Metadata

Metadata

Labels

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions