Skip to content

Commit

Permalink
fix(transform): AWS DynamoDB Send Payload (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
jshlbrd authored Apr 29, 2024
1 parent 135d76a commit 83f71b0
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions transform/send_aws_dynamodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,6 @@ func newSendAWSDynamoDB(_ context.Context, cfg config.Config) (*sendAWSDynamoDB,
return nil, fmt.Errorf("transform: send_aws_dynamodb: %v", err)
}

if conf.Object.SourceKey == "" {
conf.Object.SourceKey = "@this"
}

tf := sendAWSDynamoDB{
conf: conf,
}
Expand Down Expand Up @@ -140,12 +136,7 @@ func (tf *sendAWSDynamoDB) Transform(ctx context.Context, msg *message.Message)
return nil, fmt.Errorf("transform: send_aws_dynamodb: %v", errSendAWSDynamoDBNonObject)
}

value := msg.GetValue(tf.conf.Object.SourceKey)
if !value.Exists() {
return []*message.Message{msg}, nil
}

if len(value.Bytes()) > sendAWSDynamoDBItemSizeLimit {
if len(msg.Data()) > sendAWSDynamoDBItemSizeLimit {
return nil, fmt.Errorf("transform: send_aws_dynamodb: %v", errSendAWSDynamoDBItemSizeLimit)
}

Expand Down

0 comments on commit 83f71b0

Please sign in to comment.