The Apache Cassandra database is the right choice when you need scalability and high availability without compromising performance. Cassandra's ColumnFamily data model offers the convenience of column indexes with the performance of log-structured updates, strong support for materialized views, and powerful built-in caching.
Additional Info
Requires Mule Enterprise License |
Yes |
Requires Entitlement |
No |
Mule Version |
3.6.0 or higher |
Configs
Configuration
<cassandradb:config>
Connection Management
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
name |
The name of this configuration. With this name can be later referenced. |
x |
||
username |
A username. NOTE: Please use a dummy username if you have disabled authentication |
|
||
password |
A password. NOTE: Leave empty if not required. If specified, the connector will try to login with this credentials |
|
||
host |
Host name or IP address |
|
||
port |
Port |
|
||
keyspace |
Cassandra keyspace |
|
||
clusterName |
Cassandra cluster name |
|
||
clusterNodes |
Cassandra cluster nodes(ip or host address and port separated by comma. E.g: host1:port1, host2:port2). If the port is not specified, the default 9042 will be used. When you specify this parameter, the host and port from general settings will be ignored. |
|
||
protocolVersion |
ProtocolVersion |
Version of the native protocol supported by the driver. |
|
|
loadBalancingPolicy |
Load balancing policy to be used when connecting to a cluster |
|
||
maxSchemaAgreementWaitSeconds |
int |
The maximum time to wait for schema agreement before returning from a DDL query. |
|
|
compression |
Compression |
The compression to use for the transport. |
|
|
sslEnabled |
boolean |
Enables the use of SSL for the cluster. |
false |
|
Processors
Create keyspace
<cassandradb:create-keyspace>
Creates a new keyspace
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
input |
operation input containing the keyspace name and the replication details |
#[payload] |
|
Returns
Return Java Type | Description |
---|---|
boolean |
true if the operation succeeded, false otherwise |
Drop keyspace
<cassandradb:drop-keyspace>
Drops the entire keyspace
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
keyspaceName |
the name of the keyspace to be dropped |
x |
Returns
Return Java Type | Description |
---|---|
boolean |
true if the operation succeeded, false otherwise |
Create table
<cassandradb:create-table>
Creates a table(column family) in a specific keyspace; If no keyspace is specified the keyspace used for login will be used
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
input |
operation input describing the table name, the keyspace name and the list of columns |
#[payload] |
|
Returns
Return Java Type | Description |
---|---|
boolean |
true if the operation succeeded, false otherwise |
Drop table
<cassandradb:drop-table>
Drops an entire table form the specified keyspace or from the keyspace used for login if none is specified as an operation parameter
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
tableName |
the name of the table to be dropped |
x |
||
keyspaceName |
(optional) the keyspace which contains the table to be dropped |
|
Returns
Return Java Type | Description |
---|---|
boolean |
true if the operation succeeded, false otherwise |
Execute CQL Query
<cassandradb:execute-c-q-l-query>
Executes the raw input query provided
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
input |
CQLQueryInput describing the parametrized query to be executed along with the parameters |
#[payload] |
|
Insert
<cassandradb:insert>
DataSense enabled
Executes the insert entity operation
XML Sample
<cassandradb:insert rowKey="1" columnParent="UserData" columnName="password" columnValue="mypassword"/>
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
table |
the table name in which the entity will be inserted |
x |
||
keyspaceName |
(optional) the keyspace which contains the table to be used |
|
||
entity |
the entity to be inserted |
#[payload] |
|
Update
<cassandradb:update>
DataSense enabled
Executes the update entity operation
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
table |
the table name in which the entity will be updated |
x |
||
keyspaceName |
(optional) the keyspace which contains the table to be dropped |
|
||
entity |
the entity to be updated |
#[payload] |
|
Delete columns value
<cassandradb:delete-columns-value>
DataSense enabled
Deletes values from an object specified by the where clause
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
table |
the name of the table |
x |
||
keyspaceName |
(optional) the keyspace which contains the table to be used |
|
||
payload |
operation input: columns to be deleted and where clause for the delete operation |
#[payload] |
|
Delete rows
<cassandradb:delete-rows>
DataSense enabled
Deletes an entire record
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
table |
the name of the table |
x |
||
keyspaceName |
(optional) the keyspace which contains the table to be used |
|
||
payload |
operation input: where clause for the delete operation |
#[payload] |
|
Select
<cassandradb:select>
Executes a select query
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
query |
the query to be executed |
#[payload] |
|
|
parameters |
the query parameters |
|
Get table names from keyspace
<cassandradb:get-table-names-from-keyspace>
Returns all the table names from the specified keyspace
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
keyspaceName |
the name of the keyspace to be used on the operation |
|
Change the type of a column
<cassandradb:change-column-type>
Changes the type of a column - check compatibility here: CQL type compatibility
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
table |
the name of the table to be used for the operation |
x |
||
keyspaceName |
(optional) the keyspace which contains the table to be used |
|
||
input |
POJO defining the name of the column to be changed and the new DataType |
#[payload] |
|
Returns
Return Java Type | Description |
---|---|
boolean |
true if the operation succeeded or false if not |
Add new column
<cassandradb:add-new-column>
Adds a new column
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
table |
the name of the table to be used for the operation |
x |
||
keyspaceName |
(optional) the keyspace which contains the table to be used |
|
||
input |
POJO defining the name of the new column and its DataType |
#[payload] |
|
Returns
Return Java Type | Description |
---|---|
boolean |
true if the operation succeeded or false if not |
Remove column
<cassandradb:drop-column>
Removes a column
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
table |
the name of the table to be used for the operation |
x |
||
keyspaceName |
(optional) the keyspace which contains the table to be used |
|
||
columnName |
the name of the column to be removed |
#[payload] |
|
Returns
Return Java Type | Description |
---|---|
boolean |
true if the operation succeeded or false if not |
Rename column
<cassandradb:rename-column>
Renames a column
Attributes
Name | Java Type | Description | Default Value | Required |
---|---|---|---|---|
config-ref |
Specify which config to use |
x |
||
table |
the name of the table to be used for the operation |
x |
||
keyspaceName |
(optional) the keyspace which contains the table to be used |
|
||
oldColumnName |
the name of the column to be changed |
#[payload] |
|
|
newColumnName |
the new value for the name of the column |
x |
Returns
Return Java Type | Description |
---|---|
boolean |
true if the operation succeeded or false if not |