christophd opened a new issue, #2941:
URL: https://github.com/apache/camel-kamelets/issues/2941

   ## Description
   
   The `aws-ddb-sink` Kamelet does not reliably set the DynamoDB operation via 
its `operation` property. The Kamelet template sets the operation as an 
Exchange property (`setProperty name=operation`), but this does not take effect 
in all cases — most notably for `UpdateItem`.
   
   The Kamelet template currently does this (in 
`kamelets/aws-ddb-sink.kamelet.yaml`):
   
   ```yaml
   template:
     from:
       uri: "kamelet:source"
       steps:
       - setProperty:
           name: operation
           constant: "{{operation}}"
       - transformDataType:
           toType: "aws2-ddb:application-json"
       - to:
           uri: "aws2-ddb:{{table}}"
           parameters:
             operation: "{{operation}}"
   ```
   
   Even though `operation` is passed both as an Exchange property and as an 
endpoint parameter, the `UpdateItem` operation is not applied correctly. This 
caused the integration test `aws-ddb-sink-update-item.citrus.it.yaml` to fail 
consistently, and the test was disabled.
   
   ## Steps to Reproduce
   
   1. Use the `aws-ddb-sink` Kamelet with `operation=UpdateItem`
   2. Send an update item JSON payload
   3. The operation defaults to `PutItem` instead of `UpdateItem`
   
   ## Expected Behavior
   
   The Kamelet should reliably apply the configured `operation` (e.g. 
`UpdateItem`) when processing messages.
   
   ## Actual Behavior
   
   The `UpdateItem` operation is not applied; the Kamelet falls back to the 
default `PutItem` operation.
   
   ## Workaround
   
   Setting the Exchange property `operation` in the calling route **before** 
invoking the Kamelet sink works:
   
   ```yaml
   - setProperty:
       name: operation
       constant: "{{aws.ddb.operation}}"
   - to:
       uri: "kamelet:aws-ddb-sink"
       parameters:
         operation: "{{aws.ddb.operation}}"
   ```
   
   ## Additional Context
   
   - The test `aws-ddb-sink-update-item.citrus.it.yaml` has the workaround 
applied and is now passing
   - The root cause may be related to how the `kamelet:` component handles 
property binding vs. Exchange property propagation — the `setProperty` inside 
the Kamelet template may be overwritten or not propagated correctly through the 
`transformDataType` step
   - This may need investigation in `apache/camel` (the Kamelet runtime) rather 
than a fix in the Kamelet template itself
   
   _Claude Code on behalf of Christoph Deppisch_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to