You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2024/03/27 10:00:35 UTC

(camel-kamelets) branch main updated: AWS DDB Stream Source: Expose Kamelet data type information (#1971)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


The following commit(s) were added to refs/heads/main by this push:
     new ed6f620e AWS DDB Stream Source: Expose Kamelet data type information (#1971)
ed6f620e is described below

commit ed6f620ee9a05bb77425bf641e9d33a629694c03
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 27 11:00:29 2024 +0100

    AWS DDB Stream Source: Expose Kamelet data type information (#1971)
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 kamelets/aws-ddb-streams-source.kamelet.yaml       | 45 +++++++++++++++++++++-
 .../kamelets/aws-ddb-streams-source.kamelet.yaml   | 45 +++++++++++++++++++++-
 2 files changed, 86 insertions(+), 4 deletions(-)

diff --git a/kamelets/aws-ddb-streams-source.kamelet.yaml b/kamelets/aws-ddb-streams-source.kamelet.yaml
index fd7de07d..29f828b1 100644
--- a/kamelets/aws-ddb-streams-source.kamelet.yaml
+++ b/kamelets/aws-ddb-streams-source.kamelet.yaml
@@ -89,9 +89,50 @@ spec:
         description: The number of milliseconds before the next poll from the database.
         type: integer
         default: 500
-  types:
+  dataTypes:
     out:
-      mediaType: application/json
+      default: json
+      headers:
+        CamelAwsDdbStreamEventSource:
+          title: The DDB Stream Event Source
+          description: The Amazon Web Services service from which the stream record originated. For DynamoDB Streams, this is aws:dynamodb.
+          type: string
+        CamelAwsDdbStreamEventId:
+          title: The DDB Stream Event Id
+          description: A globally unique identifier for the event that was recorded in this stream record.
+          type: string
+      types:
+        json:
+          format: "application-json"
+          description: Default Json representation of a DDB Stream Event.
+          mediaType: application/json
+        cloudevents:
+          format: "aws2-sqs:application-cloudevents"
+          description: |-
+            Data type transformer converts AWS Dynamo DB Streams get records response to CloudEvent v1_0 data format. The data
+            type sets Camel specific CloudEvent headers with values extracted from AWS Dynamo DB Streams get records.
+          headers:
+            CamelCloudEventID:
+              title: CloudEvent ID
+              description: The Camel exchange id set as event id
+              type: string
+            CamelCloudEventType:
+              title: CloudEvent Type
+              description: The event type
+              default: "org.apache.camel.event.aws.ddbstream.getRecords"
+              type: string
+            CamelCloudEventSource:
+              title: CloudEvent Source
+              description: The event source. By default, the DDB Stream Event source receipt handle with prefix "aws.ddbstream.".
+              type: string
+            CamelCloudEventSubject:
+              title: CloudEvent Subject
+              description: The event subject. The DDB Stream Event Id.
+              type: string
+            CamelCloudEventTime:
+              title: CloudEvent Time
+              description: The exchange creation timestamp as event time.
+              type: string
   dependencies:
   - "camel:gson"
   - "camel:aws2-ddb"
diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-streams-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-streams-source.kamelet.yaml
index fd7de07d..29f828b1 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-streams-source.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/aws-ddb-streams-source.kamelet.yaml
@@ -89,9 +89,50 @@ spec:
         description: The number of milliseconds before the next poll from the database.
         type: integer
         default: 500
-  types:
+  dataTypes:
     out:
-      mediaType: application/json
+      default: json
+      headers:
+        CamelAwsDdbStreamEventSource:
+          title: The DDB Stream Event Source
+          description: The Amazon Web Services service from which the stream record originated. For DynamoDB Streams, this is aws:dynamodb.
+          type: string
+        CamelAwsDdbStreamEventId:
+          title: The DDB Stream Event Id
+          description: A globally unique identifier for the event that was recorded in this stream record.
+          type: string
+      types:
+        json:
+          format: "application-json"
+          description: Default Json representation of a DDB Stream Event.
+          mediaType: application/json
+        cloudevents:
+          format: "aws2-sqs:application-cloudevents"
+          description: |-
+            Data type transformer converts AWS Dynamo DB Streams get records response to CloudEvent v1_0 data format. The data
+            type sets Camel specific CloudEvent headers with values extracted from AWS Dynamo DB Streams get records.
+          headers:
+            CamelCloudEventID:
+              title: CloudEvent ID
+              description: The Camel exchange id set as event id
+              type: string
+            CamelCloudEventType:
+              title: CloudEvent Type
+              description: The event type
+              default: "org.apache.camel.event.aws.ddbstream.getRecords"
+              type: string
+            CamelCloudEventSource:
+              title: CloudEvent Source
+              description: The event source. By default, the DDB Stream Event source receipt handle with prefix "aws.ddbstream.".
+              type: string
+            CamelCloudEventSubject:
+              title: CloudEvent Subject
+              description: The event subject. The DDB Stream Event Id.
+              type: string
+            CamelCloudEventTime:
+              title: CloudEvent Time
+              description: The exchange creation timestamp as event time.
+              type: string
   dependencies:
   - "camel:gson"
   - "camel:aws2-ddb"