Operation: Execute
The Execute operation of the Apache Cassandra Connector executes the statement specified in the input document.
For more information on other operations of the Apache Cassandra Connector, see Apache Cassandra Connector.
Parameters
Parameters | Description |
|---|---|
|
Adapter main class (do not change!) Possible values: de.softproject.integration.adapter.apache.cassandra.ApacheCassandraConnectorAdapter: Main Class (Standard) |
| Host within the cluster Example:
Note: You can add multiple IPs or hostnames that correspond with different servers, which are executed as executable files within the module by Apache Cassandra. |
| Native protocol port |
| Login if the cluster requires credentials Possible values: Any string with the login, e.g. |
| Password if the cluster requires credentials Possible values: Any string with the password, e.g. myPassword |
Status values
| The adapter operation was executed successfully |
| The operation failed due to a technical error. |
Input <Statement/>
The adapter expects a predefined XML structure as input.
<RootElement>
<Statement>
select * from keyspace.table;
</Statement>
<Statement>
INSERT INTO keyspace.table (id, lastname, firstname) VALUES (uuid(), myLastname,'myFirstName');
</Statement>
....
</RootElement>
Input <Preparedstatement/>
The adapter expects a predefined XML structure as input.
<RootElement>
<Preparedstatement resulttag="result element name" timeZone="timezone">
<Cql>
select * from keyspace.table;
</Cql>
<Parameters>
<parameter index="n" type="Cassandra_Type">Value</parameter>
</Parameters>
</Preparedstatement>
<Preparedstatement resulttag="result 2 element name" timeZone="timezone 2">
<Cql>
INSERT INTO keyspace.table (id, lastname, firstname) VALUES (uuid(), myLastname,'myFirstName');
</Cql>
</Preparedstatement>
....
</RootElement>
Input rules
The input XML document must comply with the following rules:
Element/Attribute | Description |
|---|---|
|
This attribute is required for the |
|
This attribute is optional for the Determines the timezone according to |
| Element within the Note: If characters are used within the CQL statement that are predefined in XML, you need to escape the SQL statement with a CDATA block. |
| Element within the |
| Element within the Attributes:
|
Possible parameter types for type
| Description |
|---|---|
| UTF-8 encoded text |
| UTF-8 encoded text |
| US-ASCII-encoded text |
| Hexadecimal-encoded binary files without validation |
| Boolean values |
| 64-bit integer |
| 64-bit counter value |
| 32-bit integer |
| 2-byte integer |
| 1-byte integer |
| Date in Note: Apacha Cassandra encodes dates as a 32-bit integer representing the days since January 1, 1970. |
| Decimal number |
| 64-bit-IEEE floating point number |
| 32-bit-IEEE floating point number |
| IP address in IPv4 or IPv6 format |
| Time of day Note: Apache Cassandra encodes time information as a 64-bit integer representing the nanoseconds since midnight. |
| Date and time The format must be specified using the
CODE
|
| UUID version 1 |
| UUID in standard UUID format |
| Integer |
| Array of characters in JSON format |
| Collection of one or more ordered elements, for example:
CODE
Note: The use of quotation marks is required. |
| Collection of one or more elements, for example:
CODE
Note: The use of quotation marks is required. |
| A group of comma-separated fields. Can contain several simple types:
Note: If the
|
Output
The output is an XML document containing the errors and the result of the adapter execution. Depending on the operation, the adapter outputs data in different XML structures:
Batch operations (INSERT, UPDATE, DROP, CREATE , ...)
<Result>
<resulttag_name> Operation executed successfully</resulttag_name>
</Result>
Operation: SELECT
<Result>
<resulttag_name>
<Object>
<Value name="field_name" type="String|Number|Boolean...">field_value</Value>
...
<Object name="Map_field_name">
<Value name="key_name" type="String|Number|Boolean...">object_value</Value>
</Object>
<Array name="Colleciton_field_name">
<Value type="String|Number|Boolean...">value_of_the_array_at_this_position</Value>
...
</Array>
...
</Object>
</resulttag_name>
</Result>
Note:
If the field is of the MAP data type, its value is represented by an object node. If the field is of the LIST, SET, or TUPLE data type, its value is represented by an array node. If the field is a simple type, its value is represented within the value node.
Examples
Here, you can find example inputs for the different prepared statements of the Execute operation: