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 49d2ec6be23b7ba02a6b28244f79774fbb7d5984
Author: Andrea Cosentino <[email protected]>
AuthorDate: Fri Jun 18 15:20:12 2021 +0200

    Added SQL Server Source Kamelet
---
 .../assets/images/kamelets/sqlserver-source.svg    |  7 ++
 docs/modules/ROOT/pages/sqlserver-source.adoc      | 76 ++++++++++++++++++++++
 2 files changed, 83 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/sqlserver-source.svg 
b/docs/modules/ROOT/assets/images/kamelets/sqlserver-source.svg
new file mode 100644
index 0000000..7e2fac9
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/sqlserver-source.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; x="0px" y="0px" viewBox="0 0 1000 
1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
+<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
+<g><path 
d="M426.9,90c10.3,0-21.7-80-21.7-80S291.9,60.3,285.1,66C278.2,71.8,416.6,90,426.9,90z"/><path
 
d="M356.9,149.5l72-44.6c-17.4,2.3-158.7-29.7-158.7-29.7c2.3,6.9,68.6,74.3,68.6,74.3L356.9,149.5L356.9,149.5z"/><path
 d="M461.2,166.7l-20.6-49.2l-59.5,36.6L461.2,166.7L461.2,166.7z"/><path 
d="M306.8,142.1l-50.3-58.9c0,0-40,27.4-34.3,34.3C227.9,124.4,306.8,142.1,306.8,142.1L306.8,142.1z"/><path
 
d="M248.5,149.5c20.6,14.9,68.6,77.8,68.6,77.8l-18.3-60.6L248.5,149.5L248.5,149.5z"/><path
 d="M3 [...]
+</svg>
\ No newline at end of file
diff --git a/docs/modules/ROOT/pages/sqlserver-source.adoc 
b/docs/modules/ROOT/pages/sqlserver-source.adoc
new file mode 100644
index 0000000..937779b
--- /dev/null
+++ b/docs/modules/ROOT/pages/sqlserver-source.adoc
@@ -0,0 +1,76 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/sqlserver-source.svg[] Microsoft SQL Server Sink
+
+*Provided by: "Apache Software Foundation"*
+
+*Support Level for this Kamelet is: "Preview"*
+
+Query data from a Microsoft SQL Server Database.
+
+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>"
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the 
`sqlserver-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *databaseName {empty}* *| Database Name| The Database Name we are pointing| 
string| | 
+| *password {empty}* *| Password| The password to use for accessing a secured 
SQL Server Database| string| | 
+| *query {empty}* *| Query| The Query to execute against the SQL Server 
Database| string| | `"INSERT INTO accounts (username,city) VALUES 
(:#username,:#city)"`
+| *serverName {empty}* *| Server Name| Server Name for the data source| 
string| | `"localhost"`
+| *username {empty}* *| Username| The username to use for accessing a secured 
SQL Server Database| string| | 
+| consumedQuery| Consumed Query| A query to run on a tuple consumed| string| | 
`"DELETE FROM accounts where user_id = :#user_id"`
+| port| Port| Server Port for the data source| string| `1433`| 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `sqlserver-source` can be used in various 
contexts.
+
+=== Knative Source
+
+The `sqlserver-source` Kamelet can be used as Knative source by binding it to 
a Knative object.
+
+.sqlserver-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: sqlserver-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: sqlserver-source
+    properties:
+      databaseName: "The Database Name"
+      password: "The Password"
+      query: "INSERT INTO accounts (username,city) VALUES (:#username,:#city)"
+      serverName: "localhost"
+      username: "The Username"
+  sink:
+    ref:
+      kind: InMemoryChannel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+
+----
+
+Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K 
installed] into the Kubernetes cluster you're connected to.
+
+Save the `sqlserver-source-binding.yaml` file into your hard drive, then 
configure it according to your needs.
+
+You can run the source using the following command:
+
+[source,shell]
+----
+kubectl apply -f sqlserver-source-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT

Reply via email to