Simba Apache Cassandra ODBC Driver Quickstart Simba Apache Cassandra ODBC Driver . Quickstart Guide

download Simba Apache Cassandra ODBC Driver Quickstart Simba Apache Cassandra ODBC Driver . Quickstart Guide

of 35

  • date post

    20-May-2020
  • Category

    Documents

  • view

    2
  • download

    0

Embed Size (px)

Transcript of Simba Apache Cassandra ODBC Driver Quickstart Simba Apache Cassandra ODBC Driver . Quickstart Guide

  • Simba Apache Cassandra ODBC Driver Quickstart Guide

    Revised: October 29, 2013

  • Page | 2

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Contents Purpose ......................................................................................................................................................... 3

    Do you need Cassandra? ............................................................................................................................... 4

    Do you need sample data in Cassandra? ...................................................................................................... 7

    Install the Simba Apache Cassandra ODBC Driver ...................................................................................... 14

    Connect from Excel ..................................................................................................................................... 19

    Connect from Tableau ................................................................................................................................ 24

    Troubleshooting .......................................................................................................................................... 31

    Architecture Mismatch Problems ........................................................................................................... 31

    For assistance at any point in this installation process, please contact Simba for free Engineering Level Support at: techsupport@simba.com.

    mailto:techsupport@simba.com

  • Page | 3

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Purpose This document is targeted towards users of the Simba Apache Cassandra ODBC Driver. The following sections will outline how to get your Windows environment quickly set up to allow for evaluation and use of the driver.

    Use the following flow-chart to determine what page of the guide to start on.

  • Page | 4

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Do you need Cassandra? How to Download Cassandra for free:

    a. Visit https://cassandra.apache.org/download/ and download the 1.2 branch. Note: The ODBC driver currently only supports Cassandra 1.2; 2.0 support coming soon.

    b. Install guides at: https://wiki.apache.org/cassandra/GettingStarted

    Confirm Cassandra is installed and running:

    STEP 1: Navigate to the /bin directory of the Cassandra installation.

    https://cassandra.apache.org/download/ https://wiki.apache.org/cassandra/GettingStarted

  • Page | 5

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    STEP 2:

    Start Cassandra by using the following command: cassandra –f

    This should print out a lot of diagnostic information to the console, however at the end it should say “Listening for thrift clients…”

  • Page | 6

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    STEP 3:

    Verify that connectivity is working by starting a separate shell and navigating to the /bin directory of the Cassandra installation. Start the Cassandra shell by executing the following command:

    cqlsh -2

    You should see something similar to the following if Cassandra is running correctly.

  • Page | 7

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Do you need sample data in Cassandra? How to get a sample data set for Cassandra?

    Step 1: Download the sample data set from: http://www.simba.com/wp-content/uploads/2013/10/FAA_Cassandra.zip Note: This is a modified version of the FAA data set, the original which is available here: http://www.transtats.bts.gov/DL_SelectFields.asp?Table_ID=236&DB_Short_Name=On-Time

    Step 2: Extract the zip file that was downloaded.

    http://www.simba.com/wp-content/uploads/2013/10/FAA_Cassandra.zip http://www.transtats.bts.gov/DL_SelectFields.asp?Table_ID=236&DB_Short_Name=On-Time

  • Page | 8

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Step 3: Ensure Cassandra is running, as per the directions in the previous section. Step 4: Navigate to the Cassandra /bin directory, and start cqlsh with the following command:

    cqlsh -2

    You should see cqlsh connect to your local Cassandra instance.

    Note that running with the “-2” option to use CQL 2 is important, as the driver will not recognize keyspaces and column families that are defined with CQL 3.

  • Page | 9

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Step 5: Create the keyspace for the new column family with the following command:

    create keyspace faa with strategy_class = ‘SimpleStrategy’ and strategy_options:replication_factor = ‘1’;

  • Page | 10

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Step 6: Switch to the newly created keyspace with the following command:

    use faa;

  • Page | 11

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Step 7: Create the column family for your data using the following command:

    CREATE COLUMNFAMILY airline (key int PRIMARY KEY, UNIQUE_CARRIER varchar, AIRLINE_ID varchar, CARRIER varchar, TAIL_NUM varchar, FL_NUM varchar);

    Step 7: Exit cqlsh by typing:

    exit

    Then restart cqlsh using the following command:

    cqlsh -3

    This is required as the COPY FROM command that is used to easily import data requires CQL3 in the latest versions of Cassandra 1.2.

  • Page | 12

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Step 8: Copy the Airline.csv file that was extracted from the zip file to your Cassandra /bin directory. Run the following command to import the data from the CSV to the column family:

  • Page | 13

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Step 9: Verify that the data has been imported correctly by running the following command:

    select * from faa.airline;

  • Page | 14

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Install the Simba Apache Cassandra ODBC Driver How to Get the Simba Apache Cassandra Driver?

    Step 1: Download from: http://www.simba.com/connectors/apache-cassandra-odbc

    Choose either the 32 or 64 bit version as appropriate. Follow the steps in the install guide (http://www.simba.com/wp-content/uploads/2013/07/Simba-ODBC-Driver-for-Cassandra- Install-Guide.pdf) to install on your machine.

    Note that the Simba Apache Cassandra ODBC Driver currently only supports Cassandra 1.2. Cassandra 2.0 support is coming soon.

    Step 2: You should receive an email with a license key attached. This license key should be placed alongside the driver DLL in the installation directory. By default, the directories for the licenses are:

    • C:\Program Files\Simba Cassandra ODBC Driver\lib • 32-bit driver on 64-bit Windows: C:\Program Files (x86)\Simba Cassandra ODBC Driver\lib

    Note that if you use Outlook, you may need to save the license file locally before placing it in the above directory to avoid permission problems.

    http://www.simba.com/connectors/apache-cassandra-odbc http://www.simba.com/wp-content/uploads/2013/07/Simba-ODBC-Driver-for-Cassandra-Install-Guide.pdf http://www.simba.com/wp-content/uploads/2013/07/Simba-ODBC-Driver-for-Cassandra-Install-Guide.pdf

  • Page | 15

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    How to Configure the DSN (Data Source Name)?

    Step 1: Open the ODBC Administrator Note: Use the ODBC Administrator that matches the bitness of the driver you are using. See http://www.simba.com/wp-content/uploads/2010/10/HOW-TO-32-bit-vs-64-bit-ODBC-Data- Source-Administrator.pdf for information.

    http://www.simba.com/wp-content/uploads/2010/10/HOW-TO-32-bit-vs-64-bit-ODBC-Data-Source-Administrator.pdf http://www.simba.com/wp-content/uploads/2010/10/HOW-TO-32-bit-vs-64-bit-ODBC-Data-Source-Administrator.pdf

  • Page | 16

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Step 2: Choose the System DSN tab.

    Step 3: Choose the “Sample Simba Cassandra DSN” and press “Configure…”

  • Page | 17

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Step 4:

    • Change the Host to the IP or hostname of your Cassandra server.

    • Change the port to the port that Cassandra is running on. Note: 9160 is the default port for Cassandra.

    • Change the database to “faa” to access the “airline” table that was created earlier, or the name of the database that has your data in it.

  • Page | 18

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Step 5: Press the “Test” button to confirm that your configuration is correct. You should see the a dialog which indicates a successful test, and lists the available catalogs in Cassandra.

    Step 6: Press the “OK” button to save the configuration.

  • Page | 19

    Simba Apache Cassandra ODBC Driver Quickstart Guide

    Connect fr