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/14 12:02:05 UTC

[camel-kamelets] 02/06: SQL Server Sink Kamelet Fixed description and more information

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 546509e3474920049a9c5181e0d8fb586a94c8f2
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Jun 14 13:33:23 2021 +0200

    SQL Server Sink Kamelet Fixed description and more information
---
 .../resources/kamelets/sqlserver-sink.kamelet.yaml  | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/library/camel-kamelets-catalog/src/main/resources/kamelets/sqlserver-sink.kamelet.yaml b/library/camel-kamelets-catalog/src/main/resources/kamelets/sqlserver-sink.kamelet.yaml
index e8952f6..d784b7c 100644
--- a/library/camel-kamelets-catalog/src/main/resources/kamelets/sqlserver-sink.kamelet.yaml
+++ b/library/camel-kamelets-catalog/src/main/resources/kamelets/sqlserver-sink.kamelet.yaml
@@ -16,12 +16,17 @@ spec:
     description: |-
       Send data to a Microsoft SQL Server Database.
 
-      In you KameletBinding file you'll need to explicitly declare the SQL Server driver dependency, like in the following YAML snippet
-      
-      spec:
-        integration:
-          dependencies:
-          - "mvn:com.microsoft.sqlserver:mssql-jdbc:<version>"
+      In you KameletBinding file you'll need to explicitly declare the SQL Server driver dependency in spec->integration->dependencies
+
+      - "mvn:com.microsoft.sqlserver:mssql-jdbc:<version>"
+
+      This Kamelet expects a JSON as body. The mapping between the JSON fields and parameters is done by key, so if you have the following query:
+
+      'INSERT INTO accounts (username,city) VALUES (:#username,:#city)'
+
+      The Kamelet need to receive as input something like:
+
+      '{ "username":"oscerd", "city":"Rome"}'
     required:
       - serverName
       - username
@@ -55,10 +60,14 @@ spec:
         title: Query
         description: The Query to execute against the SQL Server Database
         type: string
+        example: 'INSERT INTO accounts (username,city) VALUES (:#username,:#city)'
       databaseName:
         title: Database Name
         description: The Database Name we are pointing
         type: string
+  types:
+    out:
+      mediaType: application/json
   dependencies:
   - "camel:jackson"
   - "camel:kamelet"