Connectors → Cassandra

About Cassandra

Cassandra is a free and open-source, distributed, wide column store, NoSQL database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. Cassandra offers robust support for clusters spanning multiple datacenters, with asynchronous masterless replication allowing low latency operations for all clients.

About the Cassandra Connector

The Cassandra connector uses the Datastax Java Driver for Apache Cassandra which provides Java clients with a way to create Cassandra Query Language (CQL) sessions, discover keyspaces, tables, and columns as well as execute CQL queries on Cassandra. CQL is the primary language for communicating with the Apache Cassandra™ database. The syntax of CQL is very similar to that of SQL. Both languages are query-based and are executed on data in tables containing rows of columns.

The Cassandra connector supports the following Incorta specific functionality:

Feature Supported
Chunking
Data Agent
Encryption at Ingest
Incremental Load
Multi-Source
OAuth
Performance Optimized
Remote
Single-Source
Spark Extraction
Webhook Callbacks

Cassandra is a non-relational database, and so uses different concepts to store and retrieve data. Simplistically, a Cassandra keyspace is a SQL database, and a Cassandra column family is a SQL table, although CQL allows you to interchange the words TABLE and COLUMNFAMILY for convenience. In addition, CQL does not support relational features such as JOIN, GROUP BY or FOREIGN KEY. This makes writing and retrieving data from Cassandra much more efficient.

CQL defines built-in data types for columns. The following table contains a mapping of CQL data types to Incorta data types:

CQL Type Incorta Type
TINYINT Integer
SMALLINT Integer
INT Integer
VARINT Long
COUNTER Long
BIGINT Long
FLOAT Double
DOUBLE Double
DECIMAL Double
DATE Date
TIMESTAMP Timestamp
BOOLEAN String
ASCII String
INET String
UUID String
TIMEUUID String
TUPLE String
UDT String
TIME String
VARCHAR String
BLOB Unsupported
CUSTOM Unsupported
DURATION Unsupported
MAP Unsupported
SET Unsupported

Deployment Steps

To use the Cassandra Connector, a System Administrator with root access will need to copy the connector JAR file to each Incorta Node in an Incorta cluster. A CMC Administrator will need to restart the Analytics and Loader Services in the cluster.

Deployment to an Incorta Node

Here are the steps to deploy the incorta.connector.cassandra.jar file to the extensions directory of an Incorta Node that is running the Analytics and/or Loader Services in an Incorta cluster.

  • Download the Cassandra JAR file (incorta.connector.cassandra.jar) from the latest version of your Incorta customer release distribution.

    As the root user for the hosts running Incorta Nodes, use Secure Copy for shell or similar to copy the incorta.connector.cassandra.jar to the /tmp directory of the hosts. PATH_JAR_FILE='~/Downloads/incorta.connector.cassandra.jar'

    INCORTA_NODE_HOST_IPv4_LIST='1.1.1.1  2.2.2.2  3.3.3.3  4.4.4.4'
    PATH_PEM_KEY_FILE='~/.ssh/incorta_2020.pem'
    HOST_ROOT_USER='ec2-user'
    for i in ${INCORTA_NODE_HOST_IPv4_LIST}
    do
    echo $i
    scp -o StrictHostKeyChecking=no -i ${PATH_PEM_KEY_FILE} ${PATH_JAR_FILE} ${HOST_ROOT_USER}@${i}:/tmp/${PATH_JAR_FILE}
    wait
    done

    Secure shell into each Incorta Node, and if needed, change the ownership of the file to that of the incorta user.

    sudo su incorta
    sudo chown incorta:incorta /tmp/incorta.connector.cassandra.jar

    For each Incorta Node, as the incorta user, create the cassandra directory in the /extensions/connectors/ folder.

    INCORTA_NODE_INSTALLATION_PATH='/home/incorta/IncortaAnalytics/IncortaNode'mkdir ${INCORTA_NODE_INSTALLATION_PATH}/extensions/connectors/cassandra

    For each Incorta Node, as the incorta user, move the incorta.connector.cassandra.jar file from the /tmp directory to the cassandra directory.

    mv /tmp/incorta.connector.cassandra.jar ${INCORTA_NODE_INSTALLATION_PATH}/extensions/connectors/cassandra
Restart the Analytics and Loader Services

Here are the steps to restart the Analytics and Loader Services in an Incorta Cluster from the Cluster Management Console (CMC).

  • As the CMC Administrator, sign in to the CMC.
  • In the Navigation bar, select Clusters.
  • In the cluster list, select a Cluster name.
  • Select the Details tab, if not already selected.
  • In the footer, select Restart.

Steps to connect Cassandra and Incorta

To connect Cassandra and Incorta, here are the high level steps, tools, and procedures:

Create an external data source

Here are the steps to create a external data source with the Cassandra connector:

  • Sign in to the Incorta Direct Data Platform™.
  • In the Navigation bar, select Data.
  • In the Action bar, select + NewAdd Data Source.
  • In the Choose a Data Source dialog, in Query Service, select Cassandra.
  • In the New Data Source dialog, specify the applicable connector properties.
  • To test, select Test Connection.
  • Select Ok to save your changes.

Cassandra connector properties

Here are the properties for the Cassandra connector:

Property Control Description
Data Source Name text box Enter the name of the data source
Username text box Enter the Cassandra account username
Password text box Enter the Cassandra account user password
Host text box Enter the Cassandra hostname
Port text box Enter the Cassandra port
Local Data Center text box Enter the name of the Cassandra data center that is relatively local to the node identified by the host and port

Create a schema with the Schema Wizard

Here are the steps to create a Cassandra schema with the Schema Wizard:

  • Sign in to the Incorta Direct Data Platform™.
  • In the Navigation bar, select Schema.
  • In the Action bar, select + New → Schema Wizard.
  • In (1) Choose a Source, specify the following:

    • For Enter a name, enter the schema name.
    • For Select a Datasource, select the Cassandra external data source.
    • Optionally create a description.
  • In the Schema Wizard footer, select Next.
  • In (2) Manage Tables, in the Data Panel, first select the name of the Data Source, and then check the Select All checkbox.
  • In the Schema Wizard footer, select Next.
  • In (3) Finalize, in the Schema Wizard footer, select Create Schema.

Create a schema with the Schema Designer

Here are the steps to create a Cassandra schema using the Schema Designer:

  • Sign in to the Incorta Direct Data Platform™.
  • In the Navigation bar, select Schema.
  • In the Action bar, select + New → Create Schema.
  • In Name, specify the schema name, and select Save.
  • In Start adding tables to your schema, select Cassandra.
  • In the Data Source dialog, specify the Cassandra table data source properties.
  • Select Add.
  • In the Table Editor, in the Table Summary section, enter the table name.
  • To save your changes, select Done in the Action bar.

Cassandra table data source properties

For a schema table in Incorta, you can define the following Cassandra specific data source properties as follows:

Property Control Description
Type drop down list The default is Cassandra
Data Source drop down list Select the Cassandra external data source
Incremental toggle Enable the incremental load configuration for the schema table
Fetch Size text box Used for performance improvement, fetch size defines the number of records that will be retrieved from the database in each batch until all records are retrieved. The default is 5000.
Query text box Enter the CQL query to retrieve data from the Cassandra database
Update Query text box Enable Incremental to configure this property. Enter the CQL query to retrieve data updates from the Cassandra database.
Callback toggle Enable this option to call back on the source data set
Callback URL text box Enable Callback to configure this property. Specify the URL.

View the schema diagram with the Schema Diagram Viewer

Here are the steps to view the schema diagram using the Schema Diagram Viewer:

  • Sign in to the Incorta Direct Data Platform™.
  • In the Navigation bar, select Schema.
  • In the list of schemas, select the Cassandra schema.
  • In the Schema Designer, in the Action bar, select Diagram.

Load the schema

Here are the steps to perform a Full Load of the Cassandra schema using the Schema Designer:

  • Sign in to the Incorta Direct Data Platform™.
  • In the Navigation bar, select Schema.
  • In the list of schemas, select the Cassandra schema.
  • In the Schema Designer, in the Action bar, select Load → Load Now → Full.
  • To review the load status, in Last Load Status, select the date.

Explore the schema

With the full load of the Cassandra schema complete, you can use the Analyzer to explore the schema, create your first insight, and save the insight to a new dashboard.

To open the Analyzer from the schema, follow these steps:

  • In the Navigation bar, select Schema.
  • In the Schema Manager, in the List view, select the Cassandra schema.
  • In the Schema Designer, in the Action bar, select Explore Data.

© Incorta, Inc. All Rights Reserved.