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/04/23 11:40:46 UTC

[camel-kamelets] 03/03: Added CassandraQL Source Kamelet

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

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

commit d83333e4480918c7b97d91526a67c4ae65aa3dd1
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Apr 23 13:40:11 2021 +0200

    Added CassandraQL Source Kamelet
---
 .../assets/images/kamelets/cassandraql-source.svg  | 47 ++++++++++++++
 docs/modules/ROOT/pages/cassandraql-source.adoc    | 71 ++++++++++++++++++++++
 2 files changed, 118 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/cassandraql-source.svg b/docs/modules/ROOT/assets/images/kamelets/cassandraql-source.svg
new file mode 100644
index 0000000..8cc29b7
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/cassandraql-source.svg
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
+<title>cassandra</title>
+<path d="M23.3,8.7c0,0-0.3,0.3-0.5,0.5c-0.5,0.5-1.2,1.3-1.7,1.5h0c-0.1,0-0.1,0-0.2-0.1l0.9-1.9l0,0c0,0.1-1,1.9-2.2,1.6l0,0
+	c0,0,0,0-0.1,0c0.6-0.8,0.8-1.5,0.8-1.5s-1,1.6-2.3,1.2c0,0-0.1,0-0.1-0.1c0,0,0-0.1,0-0.1c0-0.1,0.1-0.1,0.1-0.2
+	c0.1-0.2,0.3-0.5,0.3-0.5S18.3,9.5,18,9.7l0,0c-0.2,0.1-0.5,0.3-0.7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,0.1,0.3,0.3,0.4,0.4c2.2,0.6,4.6-0.3,5.8-2.3c-0.5-0.3-1.1-0.6-1.7-0.7L17.4,15.7z
+	 M14.2,16l-1.4,0.5c0,0,0,0,0,0.1c0,0.2-0.1,0.4-0.2,0.6c0.1,0.3,0.3,0.6,0.5,0.8c0.1-0.3,0.3-0.6,0.4-0.8L13,17.4L14.2,16z
+	 M19,19.7c-0.2,0.1-0.5,0.1-0.8,0.2C18.5,19.8,18.8,19.7,19,19.7z M17.6,20c-0.2,0-0.3,0.1-0.5,0.1c-0.3,0-0.5,0.1-0.8,0.1
+	C16.8,20.1,17.2,20.1,17.6,20L17.6,20z M15.8,20.2c-0.1,0-0.3,0-0.4,0C15.5,20.2,15.6,20.2,15.8,20.2z"/>
+</svg>
diff --git a/docs/modules/ROOT/pages/cassandraql-source.adoc b/docs/modules/ROOT/pages/cassandraql-source.adoc
new file mode 100644
index 0000000..dc0cdc6
--- /dev/null
+++ b/docs/modules/ROOT/pages/cassandraql-source.adoc
@@ -0,0 +1,71 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/cassandraql-source.svg[] CassandraQL Source
+
+*Provided by: "Apache Software Foundation"*
+
+Query a Cassandra cluster table.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `cassandraql-source` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| *host {empty}* *| Host| Hostname(s) cassandra server(s). Multiple hosts can be separated by comma.| string| | `"localhosts"`
+| *keyspace {empty}* *| Keyspace| Keyspace to use| string| | `"customers"`
+| *password {empty}* *| Password| The password to use for accessing a secured Cassandra Cluster| string| | 
+| *port {empty}* *| Port| Port number of cassandra server(s)| string| | `9042`
+| *query {empty}* *| Query| The query to execute against the Cassandra cluster table| string| `"ANY"`| 
+| *username {empty}* *| Username| The username to use for accessing a secured Cassandra Cluster| string| | 
+| consistencyLevel| Consistency Level| Consistency level to use. The value can be one of ANY, ONE, TWO, THREE, QUORUM, ALL, LOCAL_QUORUM, EACH_QUORUM, SERIAL, LOCAL_SERIAL, LOCAL_ONE| string| `"ANY"`| 
+| resultStrategy| Result Strategy| The strategy to convert the result set of the query. Possible values are ALL, ONE, LIMIT_10, LIMIT_100...| string| `"ALL"`| 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `cassandraql-source` can be used in various contexts.
+
+=== Knative Source
+
+The `cassandraql-source` Kamelet can be used as Knative source by binding it to a Knative object.
+
+.cassandraql-source-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: cassandraql-source-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: cassandraql-source
+    properties:
+      host: "localhosts"
+      keyspace: "customers"
+      password: "The Password"
+      port: 9042
+      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 `cassandraql-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 cassandraql-source-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT