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 2021/06/25 12:34:36 UTC
[camel-kamelets] 01/04: Added MongoDB Sink Kamelet
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch mongodb-sink
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 68e8c8b78f7b4fc9b91f4c0eea34624a2ec5b2d3
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Jun 25 14:21:40 2021 +0200
Added MongoDB Sink Kamelet
---
mongodb-sink.kamelet.yaml | 73 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 73 insertions(+)
diff --git a/mongodb-sink.kamelet.yaml b/mongodb-sink.kamelet.yaml
new file mode 100644
index 0000000..a24f27c
--- /dev/null
+++ b/mongodb-sink.kamelet.yaml
@@ -0,0 +1,73 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+ name: mongodb-sink
+ annotations:
+ camel.apache.org/kamelet.support.level: "Preview"
+ camel.apache.org/catalog.version: "main-SNAPSHOT"
+ camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMzEgNjciIGZpbGw9IiNmZmYiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc3Ryb2tlPSIjMDAwIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiPjx1c2UgeGxpbms6aHJlZj0iI0EiIHg9IjEiIHk9IjEiLz48c3ltYm9sIGlkPSJBIiBvdmVyZmxvdz0idmlzaWJsZSI+PGcgc3Ryb2tlPSJub25lIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjxwYXRoIGQ9Ik0xNC4xNzQuMTc1bD [...]
+ camel.apache.org/provider: "Apache Software Foundation"
+ camel.apache.org/kamelet.group: "MongoDB"
+ labels:
+ camel.apache.org/kamelet.type: "sink"
+spec:
+ definition:
+ title: "MongoDB Sink"
+ description: |-
+ Send documents to MongoDB.
+
+ This Kamelet expects a JSON as body.
+ required:
+ - hosts
+ - collection
+ - password
+ - username
+ - database
+ type: object
+ properties:
+ hosts:
+ title: MongoDB Hosts
+ description: Comma separated list of MongoDB Host Addresses in host:port format.
+ type: string
+ collection:
+ title: MongoDB Collection
+ description: Sets the name of the MongoDB collection to bind to this endpoint.
+ type: string
+ password:
+ title: MongoDB Password
+ description: User password for accessing MongoDB.
+ type: string
+ format: password
+ x-descriptors:
+ - urn:alm:descriptor:com.tectonic.ui:password
+ username:
+ title: MongoDB Username
+ description: Username for accessing MongoDB.
+ type: string
+ database:
+ title: MongoDB Database
+ description: Sets the name of the MongoDB database to target.
+ type: string
+ types:
+ in:
+ mediaType: application/json
+ dependencies:
+ - "camel:kamelet"
+ - "camel:mongodb"
+ - "camel:jackson"
+ flow:
+ beans:
+ - name: local-mongodb
+ type: "#class:org.apache.camel.component.mongodb.MongoDbComponent"
+ from:
+ uri: kamelet:source
+ steps:
+ - to:
+ uri: "{{local-mongodb}}:test"
+ parameters:
+ hosts: "{{hosts}}"
+ collection: "{{collection}}"
+ password: "{{password}}"
+ username: "{{username}}"
+ database: "{{database}}"
+ operation: "insert"