-
Notifications
You must be signed in to change notification settings - Fork 489
KinesisFirehoseResponse missing Metadata field #1345
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
Comments
@chris-smith-zocdoc Thanks for the PR. Please advise if you have tested this end-to-end in actual scenario. |
@ashishdhingra I have not yet |
Somehow looking at the example at https://docs.aws.amazon.com/firehose/latest/dev/dynamic-partitioning.html, the data type of the metadata entry doesn't appear to be EDIT: It appears to be JQ expression based on information at https://aws.amazon.com/blogs/big-data/kinesis-data-firehose-now-supports-dynamic-partitioning-to-amazon-s3/. However, end-to-end testing is needed. |
@ashishdhingra The JQ expression isn't relevant to this pr, thats an alternative way of providing the partitioning data without the transformation lambda. I just confirmed this pr works as intended in our test account. My test lambda returns the partition information like this string eventType = ...
output.Metadata = new KinesisFirehoseResponse.FirehoseResponseRecordMetadata
{
PartitionKeys = new Dictionary<string, string>
{
{"event_type", eventType},
}
}; Relevant section of cdk configuration for prefix: "event_type=!{partitionKeyFromLambda:event_type}/year=!{timestamp:yyyy}/month=!{timestamp:MM}/day=!{timestamp:dd}/hour=!{timestamp:HH}/",
dynamicPartitioningConfiguration: {
enabled: true
},
processingConfiguration: {
enabled: true,
processors: [{
type: 'Lambda',
parameters: [
{
parameterName: 'LambdaArn',
parameterValue: functionArn,
}
],
}],
}, Here Which results in a file under the path
|
@ashishdhingra I've completed end to end testing, can you please take a look? |
PR has been merged and released in version 2.2.0 of Amazon.Lambda.KinesisFirehoseEvents. Thanks for the PR! |
|
Uh oh!
There was an error while loading. Please reload this page.
Describe the feature
The
metadata
field of KinesisFirehoseResponse is used for the dynamic partitioning feature in Kinesis FirehoseReference implementation in golang https://github.com/aws/aws-lambda-go/blob/1ba09afd7523e0d5a8a2e2fb58ddb8ec8b92ebb7/events/firehose.go#L36-L41 added in aws/aws-lambda-go#395
Use Case
Used to extract partition keys/values for dynamic partitioning feature in Kinesis Firehose
Proposed Solution
Add KinesisFirehoseResponseRecordMetadata class with field
partitionKeys
asDictionary<string, string>
Other Information
No response
Acknowledgements
AWS .NET SDK and/or Package version used
Amazon.Lambda.KinesisFirehoseEvents 2.1.0
Targeted .NET Platform
.net 6
Operating System and version
AmazonLinux
The text was updated successfully, but these errors were encountered: