The Cassandra destination writes data to a Cassandra cluster.

When you configure the Cassandra destination, you define connection information, optional user credentials, and map incoming fields to columns in the Cassandra table.

Batches written to Cassandra are atomic - this means you can only write entire batches of records to Cassandra. If an error occurs with one or more records in a batch, Cassandra fails the entire batch. When a batch fails, all records are sent to the stage for error handling.

Cassandra Data Types

Due to Cassandra requirements, the data types of the incoming fields must match the data types of the corresponding Cassandra columns. When appropriate, use a Field Type Converter processor earlier in the pipeline to convert data types.

For details about the conversion of Java data types to Cassandra data types, see the Cassandra documentation.

The Cassandra destination supports the following Cassandra data types:
  • Bigint
  • Boolean
  • Counter
  • Decimal
  • Double
  • Float
  • Int
  • List
  • Map
  • Text
  • Timestamp
  • Varchar
  • Varint
The following data types are not supported at this time:
  • Blob
  • Inet
  • Set
  • Uuid

Configuring a Cassandra Destination

Configure a Cassandra destination to write data to a Cassandra cluster.
  1. In the Properties panel, on the General tab, configure the following properties:
    General Property Description
    Name Stage name.
    Description Optional description.
    Required Fields Fields that must include data for the record to be passed into the stage.
    Tip: You might include fields that the stage uses.

    Records that do not include all required fields are processed based on the error handling configured for the pipeline.

    Preconditions Conditions that must evaluate to TRUE to allow a record to enter the stage for processing. Click Add to create additional preconditions.

    Records that do not meet all preconditions are processed based on the error handling configured for the stage.

    On Record Error Error record handling for the stage:
    • Discard - Discards the record.
    • Send to Error - Sends the record to the pipeline for error handling.
    • Stop Pipeline - Stops the pipeline. Not valid for cluster pipelines.
  2. On the Cassandra tab, configure the following properties:
    Cassandra Property Description
    Cassandra Contact Points Host names for nodes in Cassandra cluster. To ensure a connection, use the Add icon to enter several host names.
    Cassandra Port The port number for the Cassandra nodes.
    Protocol Version Native protocol version that defines the format of the binary messages exchanged between the driver and Cassandra. Select the protocol version that you are using.

    For information about determining your protocol version, see

    Compression Optional compression type for transport-level requests and responses.
    Use Credentials Indicates whether to use credentials to access the cluster.
    Fully-Qualified Table Name Name of the Cassandra table to use. Enter a fully-qualified name using the following format: <key space>.<table name>.
    Field to Column Mapping Map fields from the record to Cassandra columns. Use the Add icon to create additional field mappings.
    Note: The record field data type must match the data type of the Cassandra column.
  3. To use Cassandra credentials, click the Credentials tab, and then enter a user name and password.
    Tip: To secure sensitive information such as usernames and passwords, you can use runtime resources or Hashicorp Vault secrets. For more information, see Using Runtime Resources or Accessing Hashicorp Vault Secrets.