Connectors → Cassandra (Simba)

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 (Simba) Connector

The Cassandra (Simba) connector uses the Simba Cassandra ODBC Driver. The Simba Cassandra ODBC & JDBC Drivers enable direct SQL query translation to the Cassandra Query Language (CQL), offering users unparalleled performance at scale. The built-in Collaborative Query Execution (CQE) passes down filters and aggregations to provide high-performance access to 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 (Simba) 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.

Deployment Steps

To use the Cassandra (Simba) Connector, a System Administrator with root access will need to copy the following Simba Cassandra driver JAR and license files to each Incorta Node in an Incorta cluster:

  • cassandra-driver-core-3.1.1.jar
  • CassandraJDBC42.jar
  • cassandra-driver-extras-3.1.1.jar
  • Cassandra-driver-mapping-3.1.1.jar
  • SimbaCassandraJDBCDriver.lic

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 Simba Cassandra driver JAR and license files to the /runtime/lib directory of an Incorta Node that is running the Analytics and/or Loader Services in an Incorta cluster.

  • Download the Simba Cassandra driver JAR and license files.

    As the root user for the hosts running Incorta Nodes, use Secure Copy for shell or similar to copy the Simba Cassandra driver JAR and license files to the /tmp directory of the hosts.

    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} ~/Downloads/cassandra-driver-core-3.1.1.jar ~/Downloads/CassandraJDBC42.jar ~/Downloads/cassandra-driver-extras-3.1.1.jar ~/Downloads/Cassandra-driver-mapping-3.1.1.jar ~/Downloads/SimbaCassandraJDBCDriver.lic ${HOST_ROOT_USER}@${i}:/tmp/
    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/cassandra-driver-core-3.1.1.jar /tmp/CassandraJDBC42.jar /tmp/cassandra-driver-extras-3.1.1.jar /tmp/Cassandra-driver-mapping-3.1.1.jar /tmp/SimbaCassandraJDBCDriver.lic

    For each Incorta Node, as the incorta user, move the Simba Cassandra driver JAR and license files from the /tmp directory to the /runtime/libdirectory.

    mv /tmp/cassandra-driver-core-3.1.1.jar /tmp/CassandraJDBC42.jar /tmp/cassandra-driver-extras-3.1.1.jar /tmp/Cassandra-driver-mapping-3.1.1.jar /tmp/SimbaCassandraJDBCDriver.lic ${INCORTA_NODE_INSTALLATION_PATH}/runtime/lib
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.

Configure the Cassandra Driver

Here are the steps to configure the Cassandra driver:

  • Open <CASSANDRA_INSTALLATION_PATH>/conf/cassandra.yaml
  • Change rpc_address: localhost to rpc_address: <HOST_IP_ADDRESS>
  • Save and restart Cassandra.

Steps to connect Cassandra (Simba) and Incorta

To connect Cassandra (Simba) 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 (Simba) 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 (Simba).
  • In the New Data Source dialog, specify the applicable connector properties.
  • To test, select Test Connection.
  • Select Ok to save your changes.

Cassandra Simba 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
Connection Pool text box Enter the connection pool. The default is 30.
Connection String text box Enter the connection string for the Simba Cassandra JDBC driver. The format is: jdbc:cassandra://<HOST>:<PORT>;

The default port is 9042.
Connection Properties text box Optionally enter connector properties for a custom connection to Cassandra in the format: propertyName=propertyValue, where each connector property is on a new line.

The available connector properties are specified by CassandraJDBC42.jar. Refer to the Driver Configuration Options section of the Simba Cassandra JDBC Driver with SQL Connector 2.0.4 Installation and Configuration Guide for further information.
Use Data Agent toggle Enable using a data agent to securely ingest data from an external data source that is behind a firewall.
For more information, please review Tools → Data Agent and Tools → Data Manager.
Data Agent drop down list Enable Use Data Agent to configure this property. Select from the data agents created in the tenant, if any.

Important: Data Agent

A data agent is a service that runs on a remote host. It is also a data agent object in the Data Manager for a given tenant. An authentication file shared between the data agent object and the data agent service enables an authorized connection without using a VPN or SSH tunnel. With a data agent, you can securely extract data from one or more databases behind a firewall to an Incorta cluster. Your Incorta cluster can reside on-premises or in the cloud. A CMC Administrator must enable and configure an Incorta cluster to support the use of Data Agents. Only a Tenant Administrator (SuperUser) or user that belongs to a group with the SuperRole role for a given tenant can create a data agent that connects to a data agent service. To learn more, see Concepts → Data Agent and Tools → Data Agent.


Create a schema with the Schema Wizard

Here are the steps to create a Cassandra (Simba) 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 (Simba) 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 (Simba) 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 SQL Database.
  • In the Data Source dialog, specify the Cassandra (Simba) 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 Simba table data source properties

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

Property Control Description
Type drop down list The default is SQL Database
Data Source drop down list Select the Cassandra (Simba) 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.