EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

How to connect to Cassandra


Norman Matos

Associate Scrum Master • Strategy


This tutorial demonstrates how to connect to a Cassandra database in MicroStrategy.

The following tutorial covers the following scenarios:
1. Connectivity via Strategy Web and Strategy Desktop
2. Connecivity via DSN in Windows
3. Connectivity via DSN in Linux
4. Connectivity using the Simba JDBC driver

Connectivity via Strategy Web and Strategy Desktop

1. Connect to your data by clicking on Cassandra from the Database dropdown list.

ka044000000kQ2yAAE_0EM440000002MF8.png

 
2. Select your import option.

ka044000000kQ2yAAE_0EM440000002MFD.png

 
3. Pick a DSN less option, select Apache Cassandra 3.x from the drop down, fill in the correct parameters for host, port, default keyspace and the user/password.

ka044000000kQ2yAAE_0EM440000002MFI.png

 
4. The Schemas and tables should then get populated and you should be able to pull tables from left panel onto the right and do analysis using those tables.

ka044000000kQ2yAAE_0EM440000002MFN.png

 
5. You can now access this data either directly through a Live connect option or as an in-memory data set in Strategy Web.
 

ka044000000kQ2yAAE_0EM440000002MFX.png

 

Connectivity via DSN in Windows


 

  1. Strategy 10.8 ships the Cassandra ODBC driver out of the box. You can set up the ODBC DSN via ODBC Administrator(64-bit) by adding a new system DSN.
ka044000000kQ2yAAE_0EM440000002MJ0.png
  1. Enter the values for Host ,Port and Default keyspace and select the correct authentication mechanism
ka044000000kQ2yAAE_0EM440000002MJ5.png

 
 

  1. To enable case sensitivity for your queries, navigate to the advanced tab and check the Enable Case Sensitive field


 

ka044000000kQ2yAAE_0EM440000002MJA.png

 
 
Note:
By default, the varchar datatype length is set to 4000 in the Strategy Cassandra ODBC Driver.Strategy Intelligence Server uses an ODBC Call (SQLDescribeCol) to determine the proper resources to allocate for the query results, for varchar columns the default size is 4000 as specified by the “string column length” setting in the ODBC driver. You may either see a degradation in performance if this value is set too high causing a lot of memory to be allocated or you may see truncation of data if this value is set too low. Please consult your DBA to set the values for the string column length field if the defaults don’t meet your requirements.
 

  1. Configure the Strategy Cassandra ODBC driver in the ODBC Administrator and navigate to the Advanced Tab, edit the value for the String column length field
ka044000000kQ2yAAE_0EM440000002MJF.png

 
 
 

Connectivity via DSN in Linux


 

  1. Copy the section for Cassandra driver connection parameters from the odbc.ini.example file and add it to the odbc.ini in your Strategy install. Edit the values for Host,Port,DefaultKeyspace and AuthMech.


Note: For authentication mechanism to be set to No Authentication the value 0 and for Username and Password the value is 1
 

ka044000000kQ2yAAE_0EM440000002MJK.png

 
 

  1. To enable case sensitivity for your queries, set the value for the EnableCaseSensitive parameter to 1
ka044000000kQ2yAAE_0EM440000002MJP.png
  1. Edit the the StringColumnLength value to avoid perfomance degradation while quering string/varchar/text datatype values or data truncation issues
ka044000000kQ2yAAE_0EM440000002MJU.png

 
 

Connectivity using the Simba JDBC driver


 

Prerequisites


Before connecting to Cassandra, the Simba Cassandra JDBC driver(SimbaCassandraJDBC42-1.1.2.1002.zip) musted be downloaded and unzipped on the machine with your Strategy install.

Connecting via Strategy Developer


1. Navigate to the AdministrationàConfiguration ManagersàDatabase Instances in the Strategy Developer window and create a new database instance.
2. In the database creation wizard select Apache Cassandra 2.x as the Database Connection type.

ka044000000kQ2yAAE_0EM440000002Nnt.png

 
3. Create new database connection, go to the Advanced tab and add the following to the “Additional connection string parameters” field: JDBC;MSTR_JDBC_JAR_FOLDER=<location of unzipped driver folder>;DRIVER=com.simba.cassandra.jdbc42.Driver;URL={jdbc:cassandra://host:port;DefaultKeyspace=};
 
Note: Refer to the Simba driver documentation for additional parameters to add the URL.

ka044000000kQ2yAAE_0EM440000002No3.png

 
4. Create a DB login and hit OK to save the changes

ka044000000kQ2yAAE_0EM440000002No8.png

 
5. Expand an existing Project or create a new project and navigate to “Warehouse Catalog” under the “Schema” menu. Set the DB instance create above as the current database instance, then hit the execute button (the lightning bolt). You should be able to view the tables in Cassandra database.

ka044000000kQ2yAAE_0EM440000002NoI.png

 

 

Connecting via Data Import


1. Select Add External Data and navigate to Databases à Apache Cassandra. Choose the “Pick tables” option and add a data source
2. Check the edit connection string field and copy the following connection string into the text box JDBC;MSTR_JDBC_JAR_FOLDER==<location of unzipped driver folder>;DRIVER=com.simba.cassandra.jdbc42.Driver;URL={jdbc:cassandra://host:9042}
Note: You can refer the simba documentation for additional connection parameters to add to the URL.

ka044000000kQ2yAAE_0EM440000002NoS.png

3. You should now successfully be able to connect and view the keyspaces and tables available.

ka044000000kQ2yAAE_0EM440000002Nom.png

 


Comment

0 comments

Details

Knowledge Article

Published:

August 7, 2017

Last Updated:

August 7, 2017