PutCassandraQL

Description:

Execute provided Cassandra Query Language (CQL) statement on a Cassandra 1.x, 2.x, or 3.0.x cluster. The content of an incoming FlowFile is expected to be the CQL command to execute. The CQL command may use the ? to escape parameters. In this case, the parameters to use must exist as FlowFile attributes with the naming convention cql.args.N.type and cql.args.N.value, where N is a positive integer. The cql.args.N.type is expected to be a lowercase string indicating the Cassandra type.

Tags:

cassandra, cql, put, insert, update, set

Properties:

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, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
Cassandra Connection Providercassandra-connection-providerController Service API:
CassandraSessionProviderService
Implementation: CassandraSessionProvider
Specifies the Cassandra connection providing controller service to be used to connect to Cassandra cluster.
Cassandra Contact PointsCassandra Contact PointsContact 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.
Supports Expression Language: true (will be evaluated using variable registry only)
KeyspaceKeyspaceThe Cassandra Keyspace to connect to. If no keyspace is specified, the query will need to include the keyspace name before any table reference, in case of 'query' native processors or if the processor exposes the 'Table' property, the keyspace name has to be provided with the table name in the form of <KEYSPACE>.<TABLE>
Supports Expression Language: true (will be evaluated using variable registry only)
SSL Context ServiceSSL Context ServiceController Service API:
SSLContextService
Implementations: StandardRestrictedSSLContextService
StandardSSLContextService
The SSL Context Service used to provide client certificate information for TLS/SSL connections.
Client AuthClient AuthREQUIRED
  • WANT
  • REQUIRED
  • NONE
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.
UsernameUsernameUsername to access the Cassandra cluster
Supports Expression Language: true (will be evaluated using variable registry only)
PasswordPasswordPassword to access the Cassandra cluster
Sensitive Property: true
Supports Expression Language: true (will be evaluated using variable registry only)
Consistency LevelConsistency LevelONE
  • ANY
  • ONE
  • TWO
  • THREE
  • QUORUM
  • ALL
  • LOCAL_QUORUM
  • EACH_QUORUM
  • SERIAL
  • LOCAL_SERIAL
  • LOCAL_ONE
The strategy for how many replicas must respond before results are returned.
Character SetCharacter SetUTF-8Specifies the character set of the record data.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Max Wait TimeMax Wait Time0 secondsThe 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.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Statement Cache Sizeputcql-stmt-cache-size0The maximum number of CQL Prepared Statements to cache. This can improve performance if many incoming flow files have the same CQL statement with different values for the parameters. If this property is set to zero, the cache is effectively disabled.
Supports Expression Language: true (will be evaluated using variable registry only)

Relationships:

NameDescription
retryA FlowFile is transferred to this relationship if the operation cannot be completed but attempting it again may succeed.
successA FlowFile is transferred to this relationship if the operation completed successfully.
failureA FlowFile is transferred to this relationship if the operation failed.

Reads Attributes:

NameDescription
cql.args.N.typeIncoming FlowFiles are expected to be parameterized CQL statements. The type of each parameter is specified as a lowercase string corresponding to the Cassandra data type (text, int, boolean, e.g.). In the case of collections, the primitive type(s) of the elements in the collection should be comma-delimited, follow the collection type, and be enclosed in angle brackets (< and >), for example set<text> or map<timestamp, int>.
cql.args.N.valueIncoming FlowFiles are expected to be parameterized CQL statements. The value of the parameters are specified as cql.args.1.value, cql.args.2.value, cql.args.3.value, and so on. The type of the cql.args.1.value parameter is specified by the cql.args.1.type attribute.

Writes Attributes:

None specified.

State management:

This component does not store state.

Restricted:

This component is not restricted.

Input requirement:

This component requires an incoming relationship.

System Resource Considerations:

ResourceDescription
MEMORYAn instance of this component can cause high usage of this system resource. Multiple instances or high concurrency settings may result a degradation of performance.