Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector...

17
Simba Cassandra ODBC Driver with SQL Connector User Guide Last Revised: March 26, 2013 Simba Technologies Inc.

Transcript of Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector...

Page 1: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector

User Guide

Last Revised: March 26, 2013

Simba Technologies Inc.

Page 2: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com i

Copyright ©2012-2013 Simba Technologies Inc. All Rights Reserved.

Information in this document is subject to change without notice. Companies, names and data used in examples herein are fictitious unless otherwise noted. No part of this publication, or the software it describes, may be reproduced, transmitted, transcribed, stored in a retrieval system, decompiled, disassembled, reverse-engineered, or translated into any language in any form by any means for any purpose without the express written permission of Simba Technologies Inc.

Trademarks

Simba, the Simba logo, SimbaEngine, SimbaEngine C/S, SimbaExpress and SimbaLib are registered trademarks of Simba Technologies Inc. All other trademarks and/or servicemarks are the property of their respective owners.

Contact Us

Simba Technologies Inc. 938 West 8th Avenue Vancouver, BC Canada V5Z 1E5

www.simba.com

Telephone +1 (604) 633-0008 sales: extension 2, support: extension 3 Fax +1 (604) 633-0004

Information and product sales: [email protected]

Technical support: [email protected]

Follow us on Twitter:

@simbatech

Printed in Canada

Page 3: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com ii

Table of Contents Introduction ........................................................................................................................................................1

Contact Us ...........................................................................................................................................................1

Windows Driver ..................................................................................................................................................2 System requirements .................................................................................................................................2 Installation .....................................................................................................................................................2 Configuration ...............................................................................................................................................5 Schema definition .................................................................................................................................... 10

Features ............................................................................................................................................................. 11 SQL Connector ........................................................................................................................................... 11 Data Types ................................................................................................................................................... 11 Authentication .......................................................................................................................................... 11 Catalog Support ........................................................................................................................................ 12

Third Party Trademarks ................................................................................................................................ 13

Page 4: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com 1

Introduction The Simba Cassandra ODBC Driver enables Business Intelligence (BI), analytics and reporting on data that is stored in Cassandra databases. It complies with the ODBC 3.52 data standard and adds important functionality such as Unicode and 32- and 64-bit support for high-performance computing environments on all platforms.

ODBC is one the most established and widely supported APIs for connecting to and working with databases. At the heart of the technology is the ODBC driver, which connects an application to the database. For more information about ODBC, see http://www.simba.com/odbc.htm. For complete information on the ODBC 3.52 specification, see the MSDN ODBC Programmer's Reference, available from the Microsoft web site at http://msdn.microsoft.com/en-us/library/ms714562(VS.85).aspx

Contact Us If you have difficulty using Simba Cassandra ODBC Driver with SQL Connector, please contact our support staff. We welcome your questions, comments, and feature requests. Please have a detailed summary of the client and server environment (OS version, patch-level, Cassandra distribution version, configuration etc.) ready, before you call or write to us. Supplying this information accelerates support.

By telephone:

Call (604) 633-0008 and press 3

Customer Support is available Monday – Friday, from 8 a.m. until 5 p.m. Pacific Time.

By fax or e-mail:

Fax (604) 633-0004

Send e-mail to [email protected]

On the Internet:

Visit us at www.simba.com.

Follow us on Twitter: @simbatech

Page 5: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com 2

Windows Driver

System requirements • Windows® XP with SP3, Windows® Vista, Windows® 7 Professional or Windows® 2008 R2. Both

32-bit and 64-bit editions are supported.

• 25 MB of available disk space.

Installing the driver requires administrator privileges.

Installation There are two versions of the driver for Windows:

• SimbaCassandraODBC32.msi for 32-bit editions of Windows

• SimbaCassandraODBC64.msi for 64-bit editions of Windows

The version of the driver that you select should match the bitness of the application. For example, if the application is 64-bit then you should install the 64-bit driver. It is allowable to install both versions of the driver.

The following document explains how to use ODBC on 64-bit editions of Windows: http://www.simba.com/docs/HOW-TO-32-bit-vs-64-bit-ODBC-Data-Source-Administrator.pdf

To install the driver: 1. Double-click the appropriate MSI file.

The Simba Cassandra ODBC Driver Setup window opens.

Page 6: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com 3

2. Click Next. The End-User License Agreement page is displayed.

3. Select the "I accept the terms in the License Agreement" checkbox and then, click Next.

The Destination Folder page is displayed.

Page 7: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com 4

4. Click Next. The Ready to install Simba Cassandra ODBC Driver page is displayed.

5. Click Install.

6. When the Windows User Account Control window appears, click Yes. When the installation is finished, the Completed the Simba Cassandra ODBC Driver Setup Wizard page is displayed.

7. Click Finish.

The Simba Cassandra ODBC Driver installation is complete. The next step is to create a Data Source Name.

Page 8: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com 5

Configuration

Configure a Data Source Name (DSN) 1. Click the Start button .

2. Click All Programs.

3. Click the Simba Cassandra ODBC Driver (64-bit) or the Simba Cassandra ODBC Driver (32-bit) program group.

If you installed both versions of the driver, you will see two program groups.

Because DSNs are bit-specific, select the version that matches the bitness of your application. For example, a DSN that is defined for the 32-bit driver will only be accessible from 32-bit applications

4. Click 64-bit ODBC Administrator or 32-bit ODBC Administrator. The ODBC Data Source Administrator window opens.

Page 9: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com 6

5. Click the Drivers tab and verify that the Simba Cassandra ODBC Driver is displayed in the list of ODBC drivers that are installed on your system.

6. Click the System DSN tab to create a system DSN or click the User DSN tab to create a user

DSN. Note: A system DSN can be seen by all users that login to a workstation. A user DSN is specific to a user on the workstation. It can only be seen by the user who creates it.

7. Click Add. The Create New Data Source window opens.

Page 10: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com 7

8. Select Simba Cassandra ODBC Driver and then click Finish. The Simba Cassandra ODBC Connector Setup window opens.

9. In the Data Source Name text box, type a name for your DSN.

10. Optionally, in the Description text box, enter a description for the DSN.

11. In the Host text box, type the name or IP address of the host that your Cassandra instance is running on.

12. In the Port text box, type the port that your Cassandra instance is using.

13. In the Catalog text box, type the name of your Cassandra keyspace or click the drop-list button on the right to select the keyspace from the list of keyspaces obtained from the Cassandra instance.

14. Optionally, click Advanced Options. The advanced options are described in more detail in the section, Advanced options.

15. Optionally, click Schema Definition. Schema definition is described in more detail in the section, Schema definition.

16. Click OK to finish the configuration and close the Simba Cassandra ODBC Driver Setup window.

17. Click OK to close the ODBC Data Source Administrator window.

Page 11: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com 8

Advanced options

The advanced configuration settings can be set any of the following ways:

• with the Simba Cassandra ODBC Driver Setup wizard

• with the database connection string

• with registry settings

The following advanced configuration settings are available:

Option Name Default Value

Description

Maximum rows per fetch

4096 The number of rows to be fetched per block. Any positive 32-bit integer is a valid value but testing has shown that performance gains are marginal beyond the default value of 10000 rows.

Default max column size

255 The default string column length to use. Cassandra does not provide the length for string columns in its column metadata. This option allows you to tune the length of String columns.

Schema detection row limit

128 The number of rows to sample when detecting a table’s schema.

Connect Timeout (ms)

30000 The default connection timeout in milliseconds.

Send Timeout (ms) 10000 The default send timeout in milliseconds.

Receive Timeout (ms) 10000 The default receive timeout in milliseconds.

Use Native Query Disabled Reserved for future use.

Set advanced options using the Simba Cassandra ODBC Driver Setup wizard 1. Follow the steps described in the section Configure a Data Source Name (DSN).

Page 12: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com 9

2. Click Advanced Options. The Advanced Options window opens.

3. Type new values in the text boxes and then click OK.

Set advanced options using the database connection string

An example of a connection string that sets advanced options is as follows:

DSN=Sample Simba Cassandra DSN; Host=192.168.100.100; Port=27017; Catalog=mydb; UID=myusername; PWD=<password>; DefaultMaxColumnSize=1000; MaxFetchRows=2000; Sdrl=100; ConnTimeout=60000; SendTimeout=20000; RecvTimeout=20000

Note: Connection string settings override registry settings.

Page 13: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com 10

Schema definition 1. Follow the steps described in the section Configure a Data Source Name (DSN).

2. Click Schema Definition. The Schema Definition window opens.

3. In the Table Name drop-down list, select a table to work with.

4. The Columns pane displays the name and data type of the columns in the table. The data type is inferred from a sample of the rows that is taken from the table. To change the sample size, in the rows text box, type a number of rows and then click Sample.

5. To change the data type for a column, click on the data type for the column and select a new data type from the list. The Data Preview pane will be updated to reflect the change. If a sample data value cannot be represented with the selected data type, the Data Preview pane will display a conversion error message instead of the data value

6. Optionally, click Add to add a column to your schema definition.1

7. Optionally, click Remove to remove a column from your schema definition.1

1 This button has been disabled as this feature is not yet shipping in the driver.

Page 14: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com 11

8. The Data Preview pane displays a preview of the data that is contained in the table.

9. Click OK.

Features

SQL Connector To allow applications to use normal SQL queries against Cassandra, we have added the SQL Connector feature to translate standard SQL-92 queries into equivalent Cassandra Thrift calls. This allows standard queries that BI tools execute to run against your Cassandra instance.

Data Types The following data types are supported:

o AsciiType o BooleanType o BytesType o DateType o DecimalType o DoubleType o FloatType o Int32Type o IntegerType o LongType o UTF8Type

The following types not fully supported yet, and are mapped to raw binary:

o CompositeType o CounterColumnType o LocalByPartitionerType o ReversedType o UUIDType

Authentication The Cassandra service currently does not support authentication in the typical manner of a user login. There is no mechanism to pass in a user context (such as a user/password/token). Data security models are still under active development so this will change in the future. As a workaround, you will need to use the features available in your application to implement access control.

Page 15: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com 12

Catalog Support The Simba Cassandra ODBC Driver supports catalogs by mapping the keyspaces within Cassandra to the catalogs in order to make it easy for the driver to work with various ODBC applications.

Page 16: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com 13

Third Party Trademarks ICU License - ICU 1.8.1 and later

COPYRIGHT AND PERMISSION NOTICE

Copyright (c) 1995-2010 International Business Machines Corporation and others

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.

All trademarks and registered trademarks mentioned herein are the property of their respective owners.

OpenSSL

Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)"

4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact [email protected].

5. Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project.

6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)"

THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Apache Cassandra

Copyright 2009-2010 The Apache Software Foundation.

Page 17: Simba Cassandra ODBC Driver with SQL Connector …...Simba Cassandra ODBC Driver with SQL Connector User Guide 1 Introduction The Simba Cassandra ODBC Driver enables Business Intelligence

Simba Cassandra ODBC Driver with SQL Connector User Guide

www.simba.com 14

Apache Thrift

Copyright 2006-2010 The Apache Software Foundation.

Expat

"Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ""Software""), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NOINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."