Execute provided Cassandra Query Language (CQL) select query on a Cassandra 1.x or 2.x cluster. Query result may be converted to Avro or JSON format. Streaming is used so arbitrarily large result sets are supported. This processor can be scheduled to run on a timer, or cron expression, using the standard scheduling methods, or it can be triggered by an incoming FlowFile. If it is triggered by an incoming FlowFile, then attributes of that FlowFile will be available when evaluating the select query. FlowFile attribute ‘executecql.row.count’ indicates how many rows were selected.


cassandra, cql, select


In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, whether a property supports the Expression Language Guide, and whether a property is considered “sensitive”, meaning that its value will be encrypted. Before entering a value in a sensitive property, ensure that the file has an entry for the property nifi.sensitive.props.key.

Name Default Value Allowable Values Description
Cassandra Contact Points Contact points are addresses of Cassandra nodes. The list of contact points should be comma-separated and in hostname:port format. Example node1:port,node2:port,.... The default client port for Cassandra is 9042, but the port(s) must be explicitly specified.
Keyspace The Cassandra Keyspace to connect to. If no keyspace is specified, the query will need to include the keyspace name before any table reference.
SSL Context Service Controller Service API:
The SSL Context Service used to provide client certificate information for TLS/SSL connections.
Client authentication policy when connecting to secure (TLS/SSL) cluster. Possible values are REQUIRED, WANT, NONE. This property is only used when an SSL Context has been defined and enabled.
Username Username to access the Cassandra cluster
Password Password to access the Cassandra cluster
Sensitive Property: true
Consistency Level ONE * ANY
The strategy for how many replicas must respond before results are returned.
Character Set UTF-8 Specifies the character set of the record data.
CQL select query CQL select query
Supports Expression Language: true
Max Wait Time 0 seconds The maximum amount of time allowed for a running CQL select query. Must be of format <duration> <TimeUnit> where <duration> is a non-negative integer and TimeUnit is a supported Time Unit, such as: nanos, millis, secs, mins, hrs, days. A value of zero means there is no limit.
Fetch size 0 The number of result rows to be fetched from the result set at a time. Zero is the default and means there is no limit.
Output Format Avro * Avro
The format to which the result rows will be converted. If JSON is selected, the output will contain an object with field 'results' containing an array of result rows. Each row in the array is a map of the named column to its value. For example: { "results": [{"userid":1, "name":"Joe Smith"}]}


Name Description
retry A FlowFile is transferred to this relationship if the query cannot be completed but attempting the operation again may succeed.
failure CQL query execution failed.
success Successfully created FlowFile from CQL query result set.

Reads Attributes:

None specified.

Writes Attributes:

Name Description
executecql.row.count The number of rows returned by the CQL query