Execute CQL (NoSQL)
Synopsis
This operator is used to execute a CQL statement on a Cassandra or Astra database.Description
The Execute CQL operator is used to execute CQL statements on a Cassandra cluster. It cannot return data though and therefore 'SELECT' will not yield any results.
Input
- file (File)
The CQL file which specifies the CQL statement to be executed. If the 'define query' parameter is set to the 'query file' option, the input port 'file' is used for the CQL file. Note: If the input port is connected to another operator with output port file and the input port is connected to it, the 'query file' option of the 'define query file' parameter is ignored.
- connection (Connection)
This input port expects a Connection object if any. See the parameter connection entry for more information.
- through (IOObject)
An arbitrary Input/Output (IO) object that is passed through the operator.
Output
- file (File)
If the input port 'file' is connected, the unchanged CQL file is returned.
- connection (Connection)
This output port delivers the Connection object from the input port. If the input port is not connected the port delivers nothing.
- through (IOObject)
An arbitrary Input/Output (IO) object that is passed through the operator.
Parameters
- connection_source This parameter indicates how the connection should be specified. It gives you two options, predefined and repository. The parameter is not visible if the connection input port is connected. Range: selection
- connection_entry This parameter is only available when the connection source parameter is set to repository. This parameter is used to specify a repository location that represents a connection entry. The connection can also be provided using the connection input port. Range: string
- conncetion This parameter is only available when the connection source parameter is set to predefined. The connection details for the Cassandra connection can be specified here. If you have already configured a Cassandra connection, you can select it from the drop-down list. If you have not configured a Cassandra connection yet, select the Cassandra icon right to the drop-down list. Create a new Cassandra connection in the Manage connections box. The contact points and keyspace name are mandatory. Range: configurable
- consistency_level
The consistency level for the Cassandra query. The consistency level defines how many Cassandra nodes have to respond to the query in order to be successful.
Possible levels are: ONE, TWO, THREE, QUORUM, ALL, ANY
- ONE: A write must be written at least to one node.
- TWO: A write must be written at least to two nodes.
- THREE: A write must be written at least to three nodes.
- QUORUM: A write must be written at least on a quorum of nodes. A quorum is calculated as (rounded down to a whole number): (replication_factor / 2) + 1. For example, with a replication factor of 3, a quorum is 2 (can tolerate 1 node down). With a replication factor of 6, a quorum is 4 (can tolerate 2 nodes down).
- ALL: A write must be written on all nodes in the cluster for that row key.
- ANY: A write must be written to at least one node
- define_query
This parameter allows to select the mode the data of a query should be
defined.
- query: Define a CQL query via the 'query' parameter.
- query file: Load CQL query from file. If 'file' input port is connected, the query is loaded from the provided file object.
- query The CQL query that defines the data that should be queried can be specified here. It is shown if 'define query' is set to 'query'. The operator cannot return data though and therefore 'SELECT' will not yield any results. Range: string
- query_file The CQL file which contains the CQL statement that defines the data that should be queried can be specified here. It is shown if 'define query' is set to 'query file'. The operator cannot return data though and therefore 'SELECT' will not yield any results. Range: file
- prepare_statement This parameter specifies whether the query will be a prepared query or a normal query. If activated, the parameter 'parameters' is shown. Range: boolean
- parameters If you have activated the 'prepare statement' checkbox, this parameter allows to specify prepared values for the query. Every '?' from the specified CQL query will be replaced by the prepared values in the order they are listed in the Edit parameter list: parameters. Note: If you select the wrong type for the parameter, an error message informs you about. Range: enumeration