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 2023/05/11 12:17:53 UTC

[camel-kamelets] branch main updated (b18ae5c4 -> 83822068)

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

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


    from b18ae5c4 Upgrade Camel to 4.0.0-M3
     new 0a2bbc5b Add Azure CosmosDB Sink Kamelet
     new eb0c2748 Add Azure CosmosDB Sink Kamelet
     new ec06c5c9 Add Azure CosmosDB Sink Kamelet
     new bfc23177 Add Azure CosmosDB Sink Kamelet
     new c5db06e7 Add Azure CosmosDB Sink Kamelet
     new c2b6010e Add Azure CosmosDB Sink Kamelet
     new f83d32fb Add Azure CosmosDB Sink Kamelet
     new 83822068 Add Azure CosmosDB Sink Kamelet

The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/modules/ROOT/nav.adoc                         |  1 +
 .../azure-cosmosdb-sink.kamelet.yaml               | 80 ++++++++++++----------
 ...melet.yaml => azure-cosmosdb-sink.kamelet.yaml} | 80 ++++++++++++----------
 3 files changed, 85 insertions(+), 76 deletions(-)
 copy library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-source.kamelet.yaml => kamelets/azure-cosmosdb-sink.kamelet.yaml (74%)
 copy library/camel-kamelets/src/main/resources/kamelets/{azure-cosmosdb-source.kamelet.yaml => azure-cosmosdb-sink.kamelet.yaml} (74%)


[camel-kamelets] 02/08: Add Azure CosmosDB Sink Kamelet

Posted by ac...@apache.org.
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

commit eb0c27487faddfb500c2439afb655701cca63471
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu May 11 14:06:55 2023 +0200

    Add Azure CosmosDB Sink Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../kamelets/azure-cosmosdb-sink.kamelet.yaml      | 105 +++++++++++++++++++++
 1 file changed, 105 insertions(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml
new file mode 100644
index 00000000..1f892638
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml
@@ -0,0 +1,105 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: azure-cosmosdb-sink
+  annotations:
+    camel.apache.org/kamelet.support.level: "Stable"
+    camel.apache.org/catalog.version: "4.0.0-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOCAxOCI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJhIiBjeD0iLTEwNS4wMDYiIGN5PSItMTAuNDA5IiByPSI1Ljk1NCIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxLjAzNiAwIDAgMS4wMjcgMTE3LjczOSAxOS42NDQpIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agb2Zmc2V0PSIuMTgzIiBzdG9wLWNvbG9yPSIjNWVhMGVmIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDA3OGQ0Ii8+PC9yYWRpYWxHcmFkaWVudD48Y2xpcFBhdG [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Azure CosmosDB"
+    camel.apache.org/kamelet.namespace: "Azure"
+  labels:
+    camel.apache.org/kamelet.type: "sinks"
+spec:
+  definition:
+    title: "Azure CosmosDB Sink"
+    description: |-
+      Send Data to an Azure CosmosDB instance
+    required:
+      - databaseName
+      - containerName
+      - accountKey
+      - databaseEndpoint
+    type: object
+    properties:
+      databaseName:
+        title: Database Name
+        description: The Azure Cosmos database name.
+        type: string
+      containerName:
+        title: Container Name
+        description: The Azure Cosmos container name.
+        type: string
+      accountKey:
+        title: Account Key
+        description: The Azure Cosmos account Key.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      databaseEndpoint:
+        title: Database Endpoint
+        description: Sets the Azure Cosmos database endpoint the component will connect to.
+        type: string
+      itemPartitionKey:
+        title: Item Partition Key
+        description: Represents a partition key value in the Azure Cosmos DB database service. A partition key identifies the partition where the item is stored in.
+        type: string
+  types:
+    in:
+      mediaType: application/json
+  dependencies:
+    - "camel:azure-cosmosdb"
+    - "camel:kamelet"
+    - "camel:jackson"
+  template:
+    from:
+      uri: "kamelet:source"
+      steps:
+      - choice:
+          precondition: true
+          when:
+            - simple: '${propertiesExist:!itemPartitionKey}'
+              steps:
+                - choice:   
+                    when:
+                      - simple: "${header[itemPartitionKey]}"
+                        steps:
+                          - set-header:
+                              name: CamelAzureCosmosDbItemPartitionKey
+                              simple: "${header[itemPartitionKey]}"
+                      - simple: "${header[ce-itemPartitionKey]}"
+                        steps:
+                          - set-header:
+                              name: CamelAzureCosmosDbItemPartitionKey
+                              simple: "${header[ce-itemPartitionKey]}"
+      - unmarshal:
+          json: 
+            library: Jackson
+      - to:
+          uri: "azure-cosmosdb:{{databaseName}}/{{containerName}}"
+          parameters:
+            accountKey: "{{accountKey}}"
+            databaseEndpoint: "{{databaseEndpoint}}"
+            itemPartitionKey: "{{?itemPartitionKey}}"
+            operation: createItem
+


[camel-kamelets] 05/08: Add Azure CosmosDB Sink Kamelet

Posted by ac...@apache.org.
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

commit c5db06e7d6812ae12935a02bf0c8248394f4a617
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu May 11 14:10:26 2023 +0200

    Add Azure CosmosDB Sink Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 docs/modules/ROOT/nav.adoc                | 1 +
 kamelets/azure-cosmosdb-sink.kamelet.yaml | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 91053bcf..59d28a5d 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -26,6 +26,7 @@
 * xref:aws-sqs-sink.adoc[]
 * xref:aws-sqs-source.adoc[]
 * xref:aws-translate-action.adoc[]
+* xref:azure-cosmosdb-sink.adoc[]
 * xref:azure-cosmosdb-source.adoc[]
 * xref:azure-eventhubs-sink.adoc[]
 * xref:azure-eventhubs-source.adoc[]
diff --git a/kamelets/azure-cosmosdb-sink.kamelet.yaml b/kamelets/azure-cosmosdb-sink.kamelet.yaml
index 2e3b0c24..a7fa89a0 100644
--- a/kamelets/azure-cosmosdb-sink.kamelet.yaml
+++ b/kamelets/azure-cosmosdb-sink.kamelet.yaml
@@ -27,7 +27,7 @@ metadata:
     camel.apache.org/kamelet.group: "Azure CosmosDB"
     camel.apache.org/kamelet.namespace: "Azure"
   labels:
-    camel.apache.org/kamelet.type: "sinks"
+    camel.apache.org/kamelet.type: "sink"
 spec:
   definition:
     title: "Azure CosmosDB Sink"


[camel-kamelets] 06/08: Add Azure CosmosDB Sink Kamelet

Posted by ac...@apache.org.
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

commit c2b6010e95330b96bedc37ac888a2ca28ec7d671
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu May 11 14:11:09 2023 +0200

    Add Azure CosmosDB Sink Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml
index 2e3b0c24..a7fa89a0 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml
@@ -27,7 +27,7 @@ metadata:
     camel.apache.org/kamelet.group: "Azure CosmosDB"
     camel.apache.org/kamelet.namespace: "Azure"
   labels:
-    camel.apache.org/kamelet.type: "sinks"
+    camel.apache.org/kamelet.type: "sink"
 spec:
   definition:
     title: "Azure CosmosDB Sink"


[camel-kamelets] 07/08: Add Azure CosmosDB Sink Kamelet

Posted by ac...@apache.org.
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

commit f83d32fbc9d0b8a6e2a0f8b74644cf38d73e5702
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu May 11 14:11:31 2023 +0200

    Add Azure CosmosDB Sink Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 kamelets/azure-cosmosdb-sink.kamelet.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kamelets/azure-cosmosdb-sink.kamelet.yaml b/kamelets/azure-cosmosdb-sink.kamelet.yaml
index a7fa89a0..49b1947b 100644
--- a/kamelets/azure-cosmosdb-sink.kamelet.yaml
+++ b/kamelets/azure-cosmosdb-sink.kamelet.yaml
@@ -75,6 +75,7 @@ spec:
     - "camel:azure-cosmosdb"
     - "camel:kamelet"
     - "camel:jackson"
+    - "camel:core"
   template:
     from:
       uri: "kamelet:source"


[camel-kamelets] 01/08: Add Azure CosmosDB Sink Kamelet

Posted by ac...@apache.org.
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

commit 0a2bbc5bf74c3817d82ace58d18b57ddeef15016
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu May 11 14:05:20 2023 +0200

    Add Azure CosmosDB Sink Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 kamelets/azure-cosmosdb-sink.kamelet.yaml | 105 ++++++++++++++++++++++++++++++
 1 file changed, 105 insertions(+)

diff --git a/kamelets/azure-cosmosdb-sink.kamelet.yaml b/kamelets/azure-cosmosdb-sink.kamelet.yaml
new file mode 100644
index 00000000..1f892638
--- /dev/null
+++ b/kamelets/azure-cosmosdb-sink.kamelet.yaml
@@ -0,0 +1,105 @@
+# ---------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ---------------------------------------------------------------------------
+
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: azure-cosmosdb-sink
+  annotations:
+    camel.apache.org/kamelet.support.level: "Stable"
+    camel.apache.org/catalog.version: "4.0.0-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxOCAxOCI+PGRlZnM+PHJhZGlhbEdyYWRpZW50IGlkPSJhIiBjeD0iLTEwNS4wMDYiIGN5PSItMTAuNDA5IiByPSI1Ljk1NCIgZ3JhZGllbnRUcmFuc2Zvcm09Im1hdHJpeCgxLjAzNiAwIDAgMS4wMjcgMTE3LjczOSAxOS42NDQpIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSI+PHN0b3Agb2Zmc2V0PSIuMTgzIiBzdG9wLWNvbG9yPSIjNWVhMGVmIi8+PHN0b3Agb2Zmc2V0PSIxIiBzdG9wLWNvbG9yPSIjMDA3OGQ0Ii8+PC9yYWRpYWxHcmFkaWVudD48Y2xpcFBhdG [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Azure CosmosDB"
+    camel.apache.org/kamelet.namespace: "Azure"
+  labels:
+    camel.apache.org/kamelet.type: "sinks"
+spec:
+  definition:
+    title: "Azure CosmosDB Sink"
+    description: |-
+      Send Data to an Azure CosmosDB instance
+    required:
+      - databaseName
+      - containerName
+      - accountKey
+      - databaseEndpoint
+    type: object
+    properties:
+      databaseName:
+        title: Database Name
+        description: The Azure Cosmos database name.
+        type: string
+      containerName:
+        title: Container Name
+        description: The Azure Cosmos container name.
+        type: string
+      accountKey:
+        title: Account Key
+        description: The Azure Cosmos account Key.
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      databaseEndpoint:
+        title: Database Endpoint
+        description: Sets the Azure Cosmos database endpoint the component will connect to.
+        type: string
+      itemPartitionKey:
+        title: Item Partition Key
+        description: Represents a partition key value in the Azure Cosmos DB database service. A partition key identifies the partition where the item is stored in.
+        type: string
+  types:
+    in:
+      mediaType: application/json
+  dependencies:
+    - "camel:azure-cosmosdb"
+    - "camel:kamelet"
+    - "camel:jackson"
+  template:
+    from:
+      uri: "kamelet:source"
+      steps:
+      - choice:
+          precondition: true
+          when:
+            - simple: '${propertiesExist:!itemPartitionKey}'
+              steps:
+                - choice:   
+                    when:
+                      - simple: "${header[itemPartitionKey]}"
+                        steps:
+                          - set-header:
+                              name: CamelAzureCosmosDbItemPartitionKey
+                              simple: "${header[itemPartitionKey]}"
+                      - simple: "${header[ce-itemPartitionKey]}"
+                        steps:
+                          - set-header:
+                              name: CamelAzureCosmosDbItemPartitionKey
+                              simple: "${header[ce-itemPartitionKey]}"
+      - unmarshal:
+          json: 
+            library: Jackson
+      - to:
+          uri: "azure-cosmosdb:{{databaseName}}/{{containerName}}"
+          parameters:
+            accountKey: "{{accountKey}}"
+            databaseEndpoint: "{{databaseEndpoint}}"
+            itemPartitionKey: "{{?itemPartitionKey}}"
+            operation: createItem
+


[camel-kamelets] 04/08: Add Azure CosmosDB Sink Kamelet

Posted by ac...@apache.org.
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

commit bfc23177e1f01d114f53d0ed91de8e4a5d7fc3e0
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu May 11 14:09:27 2023 +0200

    Add Azure CosmosDB Sink Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml      | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml
index 1f892638..2e3b0c24 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml
@@ -33,6 +33,10 @@ spec:
     title: "Azure CosmosDB Sink"
     description: |-
       Send Data to an Azure CosmosDB instance
+      
+      In the headers, you can optionally set the `itemPartitionKey` / `ce-itemPartitionKey` property to specify the partition key for a specific item.
+
+      If you do not set the property in the header, you'll need to use the static property itemPartitonKey.
     required:
       - databaseName
       - containerName


[camel-kamelets] 03/08: Add Azure CosmosDB Sink Kamelet

Posted by ac...@apache.org.
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

commit ec06c5c9cd5b78014884583783b8f53e691cb98b
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu May 11 14:08:22 2023 +0200

    Add Azure CosmosDB Sink Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 kamelets/azure-cosmosdb-sink.kamelet.yaml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kamelets/azure-cosmosdb-sink.kamelet.yaml b/kamelets/azure-cosmosdb-sink.kamelet.yaml
index 1f892638..2e3b0c24 100644
--- a/kamelets/azure-cosmosdb-sink.kamelet.yaml
+++ b/kamelets/azure-cosmosdb-sink.kamelet.yaml
@@ -33,6 +33,10 @@ spec:
     title: "Azure CosmosDB Sink"
     description: |-
       Send Data to an Azure CosmosDB instance
+      
+      In the headers, you can optionally set the `itemPartitionKey` / `ce-itemPartitionKey` property to specify the partition key for a specific item.
+
+      If you do not set the property in the header, you'll need to use the static property itemPartitonKey.
     required:
       - databaseName
       - containerName


[camel-kamelets] 08/08: Add Azure CosmosDB Sink Kamelet

Posted by ac...@apache.org.
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

commit 83822068cfebbcf2ac9e73a071e362b559c9c779
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu May 11 14:11:53 2023 +0200

    Add Azure CosmosDB Sink Kamelet
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml         | 1 +
 1 file changed, 1 insertion(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml
index a7fa89a0..49b1947b 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/azure-cosmosdb-sink.kamelet.yaml
@@ -75,6 +75,7 @@ spec:
     - "camel:azure-cosmosdb"
     - "camel:kamelet"
     - "camel:jackson"
+    - "camel:core"
   template:
     from:
       uri: "kamelet:source"