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:18:36 UTC

[camel-kamelets] branch main updated (f6ee9ef -> 4d24537)

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 f6ee9ef  Elasticsearch index sink indexId random generator for null
     new 28b1f71  Added AWS Redshift SQL Source Kamelet
     new 75ddcff  Added AWS Redshift SQL Source Kamelet
     new 3db02ff  Added AWS Redshift SQL Source Kamelet
     new 215a614  Added AWS Redshift SQL Source Kamelet - Docs
     new 3f5e5a1  Added AWS Redshift SQL Source Kamelet - Templates
     new 73c7c0a  Added AWS Redshift SQL Source Kamelet
     new 363ae8c  Added AWS Redshift SQL Source Kamelet
     new 4d24537  Added AWS Redshift SQL Source 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:
 .../assets/images/kamelets/aws-redshift-source.svg |   1 +
 docs/modules/ROOT/nav.adoc                         |   1 +
 ...{mysql-source.adoc => aws-redshift-source.adoc} |  53 +++++-----
 kamelets/aws-redshift-source.kamelet.yaml          | 111 +++++++++++++++++++++
 .../kamelets/aws-redshift-source.kamelet.yaml      | 111 +++++++++++++++++++++
 ...nding.yaml => aws-redshift-source-binding.yaml} |  14 +--
 ...nding.yaml => aws-redshift-source-binding.yaml} |   2 +-
 7 files changed, 257 insertions(+), 36 deletions(-)
 create mode 100644 docs/modules/ROOT/assets/images/kamelets/aws-redshift-source.svg
 copy docs/modules/ROOT/pages/{mysql-source.adoc => aws-redshift-source.adoc} (61%)
 create mode 100644 kamelets/aws-redshift-source.kamelet.yaml
 create mode 100644 library/camel-kamelets/src/main/resources/kamelets/aws-redshift-source.kamelet.yaml
 copy templates/bindings/camel-k/{mariadb-sink-binding.yaml => aws-redshift-source-binding.yaml} (87%)
 copy templates/bindings/core/{mariadb-source-binding.yaml => aws-redshift-source-binding.yaml} (87%)

[camel-kamelets] 06/08: Added AWS Redshift SQL Source 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 73c7c0a297c4b8e7b7595da7a593190d8a809148
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Dec 10 13:12:30 2021 +0100

    Added AWS Redshift SQL Source Kamelet
---
 kamelets/aws-redshift-source.kamelet.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kamelets/aws-redshift-source.kamelet.yaml b/kamelets/aws-redshift-source.kamelet.yaml
index 1060362..87b51fa 100644
--- a/kamelets/aws-redshift-source.kamelet.yaml
+++ b/kamelets/aws-redshift-source.kamelet.yaml
@@ -21,7 +21,7 @@ metadata:
   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,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+UG9zdGdyZVNRTCBpY29uPC90aXRsZT48cGF0aCBkPSJNMTcuMTI4IDBhMTAuMTM0IDEwLjEzNCAwIDAgMC0yLjc1NS40MDNsLS4wNjMuMDJBMTAuOTIyIDEwLjkyMiAwIDAgMCAxMi42LjI1OEMxMS40MjIuMjM4IDEwLjQxLjUyNCA5LjU5NCAxIDguNzkuNzIxIDcuMTIyLjI0IDUuMzY0LjMzNiA0LjE0LjQwMyAyLjgwNC43NzUgMS44MTQgMS44Mi44MjcgMi44NjUuMzA1IDQuNDgyLjQxNSA2LjY4MmMuMDMuNjA3LjIwMyAxLjU5Ny [...]
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxNjE1IDE3ODMuNyIgdmlld0JveD0iMCAwIDE2MTUgMTc4My43IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im04MDcuNSAxMzYzLjggNjc4LjMgMTYxLjV2LTEyNzAuNWwtNjc4LjMgMTYxLjV6IiBmaWxsPSIjMjA1Yjk3Ii8+PHBhdGggZD0ibTE0ODUuOCAyNTQuOCAxMjkuMiA2NC42djExNDEuM2wtMTI5LjIgNjQuNnptLTY3OC4zIDExMDktNjc4LjMgMTYxLjV2LTEyNzAuNWw2NzguMyAxNjEuNXoiIGZpbGw9IiM1MTkzY2UiLz48cGF0aCBkPSJtMTI5LjIgMjU0LjgtMTI5Lj [...]
     camel.apache.org/provider: "Apache Software Foundation"
     camel.apache.org/kamelet.group: "AWS Redshift"
   labels:

[camel-kamelets] 03/08: Added AWS Redshift SQL Source 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 3db02ff78124109878ad7ca0cc1f424e9740e5c5
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Dec 10 13:08:47 2021 +0100

    Added AWS Redshift SQL Source Kamelet
---
 docs/modules/ROOT/nav.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 6aa2174..6547b0f 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -8,6 +8,7 @@
 * xref:ROOT:aws-kinesis-sink.adoc[image:kamelets/aws-kinesis-sink.svg[] AWS Kinesis Sink]
 * xref:ROOT:aws-kinesis-source.adoc[image:kamelets/aws-kinesis-source.svg[] AWS Kinesis Source]
 * xref:ROOT:aws-lambda-sink.adoc[image:kamelets/aws-lambda-sink.svg[] AWS Lambda Sink]
+* xref:ROOT:aws-redshift-source.adoc[image:kamelets/aws-redshift-source.svg[] AWS Redshift Source]
 * xref:ROOT:aws-s3-sink.adoc[image:kamelets/aws-s3-sink.svg[] AWS S3 Sink]
 * xref:ROOT:aws-s3-source.adoc[image:kamelets/aws-s3-source.svg[] AWS S3 Source]
 * xref:ROOT:aws-s3-streaming-upload-sink.adoc[image:kamelets/aws-s3-streaming-upload-sink.svg[] AWS S3 Streaming upload Sink]

[camel-kamelets] 01/08: Added AWS Redshift SQL Source 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 28b1f715387f7d992f079c3cd964a53e32ab85f0
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Dec 10 13:06:22 2021 +0100

    Added AWS Redshift SQL Source Kamelet
---
 kamelets/aws-redshift-source.kamelet.yaml | 111 ++++++++++++++++++++++++++++++
 1 file changed, 111 insertions(+)

diff --git a/kamelets/aws-redshift-source.kamelet.yaml b/kamelets/aws-redshift-source.kamelet.yaml
new file mode 100644
index 0000000..1060362
--- /dev/null
+++ b/kamelets/aws-redshift-source.kamelet.yaml
@@ -0,0 +1,111 @@
+# ---------------------------------------------------------------------------
+# 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: aws-redshift-source
+  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,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+UG9zdGdyZVNRTCBpY29uPC90aXRsZT48cGF0aCBkPSJNMTcuMTI4IDBhMTAuMTM0IDEwLjEzNCAwIDAgMC0yLjc1NS40MDNsLS4wNjMuMDJBMTAuOTIyIDEwLjkyMiAwIDAgMCAxMi42LjI1OEMxMS40MjIuMjM4IDEwLjQxLjUyNCA5LjU5NCAxIDguNzkuNzIxIDcuMTIyLjI0IDUuMzY0LjMzNiA0LjE0LjQwMyAyLjgwNC43NzUgMS44MTQgMS44Mi44MjcgMi44NjUuMzA1IDQuNDgyLjQxNSA2LjY4MmMuMDMuNjA3LjIwMyAxLjU5Ny [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "AWS Redshift"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "AWS Redshift Source"
+    description: |-
+      Query data from an AWS Redshift Database.
+    required:
+      - serverName
+      - username
+      - password
+      - query
+      - databaseName
+    type: object
+    properties:
+      serverName:
+        title: Server Name
+        description: Server Name for the data source
+        type: string
+        example: localhost
+      serverPort:
+        title: Server Port
+        description: Server Port for the data source
+        type: string
+        default: 5439
+      username:
+        title: Username
+        description: The username to use for accessing a secured AWS Redshift Database
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      password:
+        title: Password
+        description: The password to use for accessing a secured AWS Redshift Database
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      query:
+        title: Query
+        description: The Query to execute against the AWS Redshift 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
+      consumedQuery:
+        title: Consumed Query
+        description: A query to run on a tuple consumed
+        type: string
+        example: 'DELETE FROM accounts where user_id = :#user_id'
+  types:
+    out:
+      mediaType: application/json
+  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"
+  flow:
+    beans:
+      - name: dsBean
+        type: "#class:org.apache.commons.dbcp2.BasicDataSource"
+        property:
+          - key: username
+            value: '{{username}}'
+          - key: password
+            value: '{{password}}'
+          - key: url
+            value: 'jdbc:redshift://{{serverName}}:{{serverPort}}/{{databaseName}}'
+          - key: driverClassName
+            value: 'com.amazon.redshift.jdbc.Driver'
+    from:
+      uri: "sql:{{query}}"
+      parameters:
+        dataSource: "#bean:{{dsBean}}"
+        onConsume: "{{?consumedQuery}}"
+      steps:
+      - marshal:
+          json: 
+            library: Jackson
+      - to: "kamelet:sink"

[camel-kamelets] 08/08: Added AWS Redshift SQL Source 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 4d245375d585bc4a5e70d983f5eb91f57049d338
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Dec 10 13:13:16 2021 +0100

    Added AWS Redshift SQL Source Kamelet
---
 docs/modules/ROOT/assets/images/kamelets/aws-redshift-source.svg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/modules/ROOT/assets/images/kamelets/aws-redshift-source.svg b/docs/modules/ROOT/assets/images/kamelets/aws-redshift-source.svg
index b102a0e..44542ec 100644
--- a/docs/modules/ROOT/assets/images/kamelets/aws-redshift-source.svg
+++ b/docs/modules/ROOT/assets/images/kamelets/aws-redshift-source.svg
@@ -1 +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
+<svg enable-background="new 0 0 1615 1783.7" viewBox="0 0 1615 1783.7" xmlns="http://www.w3.org/2000/svg"><path d="m807.5 1363.8 678.3 161.5v-1270.5l-678.3 161.5z" fill="#205b97"/><path d="m1485.8 254.8 129.2 64.6v1141.3l-129.2 64.6zm-678.3 1109-678.3 161.5v-1270.5l678.3 161.5z" fill="#5193ce"/><path d="m129.2 254.8-129.2 64.6v1141.3l129.2 64.6z" fill="#205b97"/><path d="m979.8 1783.7 258.4-129.2v-1525.3l-258.4-129.2-79 847z" fill="#5193ce"/><path d="m635.2 1783.7-258.4-129.2v-1525.3l258 [...]
\ No newline at end of file

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

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 215a6146d1c169400f793890a0e59425f94984a3
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

[camel-kamelets] 02/08: Added AWS Redshift SQL Source 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 75ddcfffc6e6cf950fee467cead626a26a0a2945
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Dec 10 13:08:07 2021 +0100

    Added AWS Redshift SQL Source Kamelet
---
 .../kamelets/aws-redshift-source.kamelet.yaml      | 111 +++++++++++++++++++++
 1 file changed, 111 insertions(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-redshift-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-redshift-source.kamelet.yaml
new file mode 100644
index 0000000..1060362
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/aws-redshift-source.kamelet.yaml
@@ -0,0 +1,111 @@
+# ---------------------------------------------------------------------------
+# 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: aws-redshift-source
+  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,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+UG9zdGdyZVNRTCBpY29uPC90aXRsZT48cGF0aCBkPSJNMTcuMTI4IDBhMTAuMTM0IDEwLjEzNCAwIDAgMC0yLjc1NS40MDNsLS4wNjMuMDJBMTAuOTIyIDEwLjkyMiAwIDAgMCAxMi42LjI1OEMxMS40MjIuMjM4IDEwLjQxLjUyNCA5LjU5NCAxIDguNzkuNzIxIDcuMTIyLjI0IDUuMzY0LjMzNiA0LjE0LjQwMyAyLjgwNC43NzUgMS44MTQgMS44Mi44MjcgMi44NjUuMzA1IDQuNDgyLjQxNSA2LjY4MmMuMDMuNjA3LjIwMyAxLjU5Ny [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "AWS Redshift"
+  labels:
+    camel.apache.org/kamelet.type: "source"
+spec:
+  definition:
+    title: "AWS Redshift Source"
+    description: |-
+      Query data from an AWS Redshift Database.
+    required:
+      - serverName
+      - username
+      - password
+      - query
+      - databaseName
+    type: object
+    properties:
+      serverName:
+        title: Server Name
+        description: Server Name for the data source
+        type: string
+        example: localhost
+      serverPort:
+        title: Server Port
+        description: Server Port for the data source
+        type: string
+        default: 5439
+      username:
+        title: Username
+        description: The username to use for accessing a secured AWS Redshift Database
+        type: string
+        x-descriptors:
+        - urn:camel:group:credentials
+      password:
+        title: Password
+        description: The password to use for accessing a secured AWS Redshift Database
+        type: string
+        format: password
+        x-descriptors:
+        - urn:alm:descriptor:com.tectonic.ui:password
+        - urn:camel:group:credentials
+      query:
+        title: Query
+        description: The Query to execute against the AWS Redshift 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
+      consumedQuery:
+        title: Consumed Query
+        description: A query to run on a tuple consumed
+        type: string
+        example: 'DELETE FROM accounts where user_id = :#user_id'
+  types:
+    out:
+      mediaType: application/json
+  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"
+  flow:
+    beans:
+      - name: dsBean
+        type: "#class:org.apache.commons.dbcp2.BasicDataSource"
+        property:
+          - key: username
+            value: '{{username}}'
+          - key: password
+            value: '{{password}}'
+          - key: url
+            value: 'jdbc:redshift://{{serverName}}:{{serverPort}}/{{databaseName}}'
+          - key: driverClassName
+            value: 'com.amazon.redshift.jdbc.Driver'
+    from:
+      uri: "sql:{{query}}"
+      parameters:
+        dataSource: "#bean:{{dsBean}}"
+        onConsume: "{{?consumedQuery}}"
+      steps:
+      - marshal:
+          json: 
+            library: Jackson
+      - to: "kamelet:sink"

[camel-kamelets] 05/08: Added AWS Redshift SQL Source Kamelet - Templates

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 3f5e5a1ffd9032d5d7e52747ac67722b5b67bfa5
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Dec 10 13:09:21 2021 +0100

    Added AWS Redshift SQL Source Kamelet - Templates
---
 .../camel-k/aws-redshift-source-binding.yaml       | 22 ++++++++++++++++++++++
 .../bindings/core/aws-redshift-source-binding.yaml | 13 +++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/templates/bindings/camel-k/aws-redshift-source-binding.yaml b/templates/bindings/camel-k/aws-redshift-source-binding.yaml
new file mode 100644
index 0000000..3422714
--- /dev/null
+++ b/templates/bindings/camel-k/aws-redshift-source-binding.yaml
@@ -0,0 +1,22 @@
+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
+  
\ No newline at end of file
diff --git a/templates/bindings/core/aws-redshift-source-binding.yaml b/templates/bindings/core/aws-redshift-source-binding.yaml
new file mode 100644
index 0000000..d7e5ac7
--- /dev/null
+++ b/templates/bindings/core/aws-redshift-source-binding.yaml
@@ -0,0 +1,13 @@
+- route:
+    from:
+      uri: "kamelet:aws-redshift-source"
+      parameters:
+        databaseName: "The Database Name"
+        password: "The Password"
+        query: "INSERT INTO accounts (username,city) VALUES (:#username,:#city)"
+        serverName: "localhost"
+        username: "The Username"
+    steps:
+      - to:
+          uri: "log:info"
+    
\ No newline at end of file

[camel-kamelets] 07/08: Added AWS Redshift SQL Source 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 363ae8ceee39834d8d40e6e8b0d0cd4c4e5c7690
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Dec 10 13:13:01 2021 +0100

    Added AWS Redshift SQL Source Kamelet
---
 .../src/main/resources/kamelets/aws-redshift-source.kamelet.yaml        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-redshift-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-redshift-source.kamelet.yaml
index 1060362..87b51fa 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/aws-redshift-source.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/aws-redshift-source.kamelet.yaml
@@ -21,7 +21,7 @@ metadata:
   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,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+UG9zdGdyZVNRTCBpY29uPC90aXRsZT48cGF0aCBkPSJNMTcuMTI4IDBhMTAuMTM0IDEwLjEzNCAwIDAgMC0yLjc1NS40MDNsLS4wNjMuMDJBMTAuOTIyIDEwLjkyMiAwIDAgMCAxMi42LjI1OEMxMS40MjIuMjM4IDEwLjQxLjUyNCA5LjU5NCAxIDguNzkuNzIxIDcuMTIyLjI0IDUuMzY0LjMzNiA0LjE0LjQwMyAyLjgwNC43NzUgMS44MTQgMS44Mi44MjcgMi44NjUuMzA1IDQuNDgyLjQxNSA2LjY4MmMuMDMuNjA3LjIwMyAxLjU5Ny [...]
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PHN2ZyBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAxNjE1IDE3ODMuNyIgdmlld0JveD0iMCAwIDE2MTUgMTc4My43IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Im04MDcuNSAxMzYzLjggNjc4LjMgMTYxLjV2LTEyNzAuNWwtNjc4LjMgMTYxLjV6IiBmaWxsPSIjMjA1Yjk3Ii8+PHBhdGggZD0ibTE0ODUuOCAyNTQuOCAxMjkuMiA2NC42djExNDEuM2wtMTI5LjIgNjQuNnptLTY3OC4zIDExMDktNjc4LjMgMTYxLjV2LTEyNzAuNWw2NzguMyAxNjEuNXoiIGZpbGw9IiM1MTkzY2UiLz48cGF0aCBkPSJtMTI5LjIgMjU0LjgtMTI5Lj [...]
     camel.apache.org/provider: "Apache Software Foundation"
     camel.apache.org/kamelet.group: "AWS Redshift"
   labels: