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/12/10 12:13:50 UTC

[camel-kamelets] 04/08: Added AWS Redshift SQL Source Kamelet - Docs

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

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

commit d127f6f6cb228b912e3635ec98232557d50bbbdd
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Dec 10 13:09:01 2021 +0100

    Added AWS Redshift SQL Source Kamelet - Docs
---
 .../assets/images/kamelets/aws-redshift-source.svg |   1 +
 docs/modules/ROOT/pages/aws-redshift-source.adoc   | 163 +++++++++++++++++++++
 2 files changed, 164 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/aws-redshift-source.svg b/docs/modules/ROOT/assets/images/kamelets/aws-redshift-source.svg
new file mode 100644
index 0000000..b102a0e
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/aws-redshift-source.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>PostgreSQL icon</title><path d="M17.128 0a10.134 10.134 0 0 0-2.755.403l-.063.02A10.922 10.922 0 0 0 12.6.258C11.422.238 10.41.524 9.594 1 8.79.721 7.122.24 5.364.336 4.14.403 2.804.775 1.814 1.82.827 2.865.305 4.482.415 6.682c.03.607.203 1.597.49 2.879s.69 2.783 1.193 4.152c.503 1.37 1.054 2.6 1.915 3.436.43.419 1.022.771 1.72.742.49-.02.933-.235 1.315-.552.186.245.385.352.566.451.228.125.45.21.68.266.413.103  [...]
\ No newline at end of file
diff --git a/docs/modules/ROOT/pages/aws-redshift-source.adoc b/docs/modules/ROOT/pages/aws-redshift-source.adoc
new file mode 100644
index 0000000..8b83329
--- /dev/null
+++ b/docs/modules/ROOT/pages/aws-redshift-source.adoc
@@ -0,0 +1,163 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+
+= image:kamelets/aws-redshift-source.svg[] AWS Redshift Source
+
+*Provided by: "Apache Software Foundation"*
+
+*Support Level for this Kamelet is: "Preview"*
+
+Query data from an AWS Redshift Database.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `aws-redshift-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 AWS Redshift Database| string| | 
+| *query {empty}* *| Query| The Query to execute against the AWS Redshift 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 AWS Redshift Database| string| | 
+| consumedQuery| Consumed Query| A query to run on a tuple consumed| string| | `"DELETE FROM accounts where user_id = :#user_id"`
+| serverPort| Server Port| Server Port for the data source| string| `5439`| 
+|===
+
+NOTE: Fields marked with an asterisk ({empty}*) are mandatory.
+
+
+== Dependencies
+
+At runtime, the `aws-redshift-source` Kamelet relies upon the presence of the following dependencies:
+
+- camel:jackson
+- camel:kamelet
+- camel:sql
+- mvn:com.amazon.redshift:redshift-jdbc42:2.1.0.3
+- mvn:org.apache.commons:commons-dbcp2:2.8.0 
+
+== Usage
+
+This section describes how you can use the `aws-redshift-source`.
+
+=== Knative Source
+
+You can use the `aws-redshift-source` Kamelet as a Knative source by binding it to a Knative object.
+
+.aws-redshift-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: aws-redshift-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: aws-redshift-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: Channel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+  
+----
+
+==== *Prerequisite*
+
+You have xref:{camel-k-version}@camel-k::installation/installation.adoc[Camel K installed] on the cluster.
+
+==== *Procedure for using the cluster CLI*
+
+. Save the `aws-redshift-source-binding.yaml` file to your local drive, and then edit it as needed for your configuration.
+
+. Run the source by using the following command:
++
+[source,shell]
+----
+kubectl apply -f aws-redshift-source-binding.yaml
+----
+
+==== *Procedure for using the Kamel CLI*
+
+Configure and run the source by using the following command:
+
+[source,shell]
+----
+kamel bind aws-redshift-source -p "source.databaseName=The Database Name" -p "source.password=The Password" -p "source.query=INSERT INTO accounts (username,city) VALUES (:#username,:#city)" -p "source.serverName=localhost" -p "source.username=The Username" channel:mychannel
+----
+
+This command creates the KameletBinding in the current namespace on the cluster.
+
+=== Kafka Source
+
+You can use the `aws-redshift-source` Kamelet as a Kafka source by binding it to a Kafka topic.
+
+.aws-redshift-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: aws-redshift-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: aws-redshift-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: KafkaTopic
+      apiVersion: kafka.strimzi.io/v1beta1
+      name: my-topic
+  
+----
+
+==== *Prerequisites*
+
+* You've installed https://strimzi.io/[Strimzi].
+* You've created a topic named `my-topic` in the current namespace.
+* You have xref:{camel-k-version}@camel-k::installation/installation.adoc[Camel K installed] on the cluster.
+
+==== *Procedure for using the cluster CLI*
+
+. Save the `aws-redshift-source-binding.yaml` file to your local drive, and then edit it as needed for your configuration.
+
+. Run the source by using the following command:
++
+[source,shell]
+----
+kubectl apply -f aws-redshift-source-binding.yaml
+----
+
+==== *Procedure for using the Kamel CLI*
+
+Configure and run the source by using the following command:
+
+[source,shell]
+----
+kamel bind aws-redshift-source -p "source.databaseName=The Database Name" -p "source.password=The Password" -p "source.query=INSERT INTO accounts (username,city) VALUES (:#username,:#city)" -p "source.serverName=localhost" -p "source.username=The Username" kafka.strimzi.io/v1beta1:KafkaTopic:my-topic
+----
+
+This command creates the KameletBinding in the current namespace on the cluster.
+
+== Kamelet source file
+
+https://github.com/apache/camel-kamelets/blob/main/kamelets/aws-redshift-source.kamelet.yaml
+
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT