diff --git a/kamelets/aws-ddb-sink.kamelet.yaml b/kamelets/aws-ddb-sink.kamelet.yaml index e978ccee1..5e1e611c3 100644 --- a/kamelets/aws-ddb-sink.kamelet.yaml +++ b/kamelets/aws-ddb-sink.kamelet.yaml @@ -103,8 +103,13 @@ spec: type: boolean default: false dataTypes: + # No 'default:' here on purpose. Declaring a default input type makes Camel + # apply the aws2-ddb:application-json transformation at the kamelet:source + # boundary, before any step below runs -- so the operation set by this + # template was never visible to it and every message was transformed as + # PutItem. The transformDataType step below applies the same type after the + # operation is set. See #2941. in: - default: json types: json: format: "aws2-ddb:application-json" diff --git a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-route.yaml b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-route.yaml index 1b8cbc6dd..06ef96047 100644 --- a/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-route.yaml +++ b/tests/camel-kamelets-itest/src/test/resources/aws/ddb/aws-ddb-sink-route.yaml @@ -24,9 +24,6 @@ steps: - setBody: constant: "{{aws.ddb.json.data}}" - - setProperty: - name: operation - constant: "{{aws.ddb.operation}}" - log: "${body}" - to: uri: "kamelet:aws-ddb-sink"