This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch cql-sink in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit 2f6c3db802af5e37bd3b69d31e1acf51e08f17a9 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Fri Apr 23 15:26:59 2021 +0200 Added Cassandra Sink kamelet --- cassandra-sink.kamelet.yaml | 75 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) diff --git a/cassandra-sink.kamelet.yaml b/cassandra-sink.kamelet.yaml new file mode 100644 index 0000000..e5d534f --- /dev/null +++ b/cassandra-sink.kamelet.yaml @@ -0,0 +1,75 @@ +apiVersion: camel.apache.org/v1alpha1 +kind: Kamelet +metadata: + name: cassandra-sink + annotations: + camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDIyLjEuMCwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCAzMiAzMiIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgMzIgMzI7Ii [...] + camel.apache.org/provider: "Apache Software Foundation" + labels: + camel.apache.org/kamelet.type: "source" +spec: + definition: + title: "Cassandra Sink" + description: |- + Send data to a Cassandra Cluster. + + This Kamelet expects the body as JSON Array. The content of the JSON Array will be used as input for the CQL Prepared Statement set in the query parameter. + required: + - host + - port + - keyspace + - username + - password + - query + properties: + host: + title: Host + description: Hostname(s) cassandra server(s). Multiple hosts can be separated by comma. + type: string + example: localhost + port: + title: Port + description: Port number of cassandra server(s) + type: string + example: 9042 + keyspace: + title: Keyspace + description: Keyspace to use + type: string + example: customers + username: + title: Username + description: The username to use for accessing a secured Cassandra Cluster + type: string + password: + title: Password + description: The password to use for accessing a secured Cassandra Cluster + type: string + x-descriptors: + - urn:alm:descriptor:com.tectonic.ui:password + consistencyLevel: + title: Consistency Level + description: 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 + type: string + default: ANY + preparedStatement: + title: The Prepared statement + description: The Prepared statement to execute against the Cassandra cluster table + type: string + dependencies: + - "camel:jackson" + flow: + from: + uri: "kamelet:source" + steps: + - unmarshal: + json: + library: Jackson + useList: true + - to: + uri: "cql://{{host}}:{{port}}/{{keyspace}}" + parameters: + username: "{{username}}" + password: "{{password}}" + preparedStatement: "{{preparedStatement}}" + consistencyLevel: "{{consistencyLevel}}"