Cloudera ODBC Driver for Apache Hive Install Guide



Comments



Description

Cloudera ODBC Driver for Apache HiveVersion 2.5.16 Important Notice © 2010-2015 Cloudera, Inc. All rights reserved. Cloudera, the Cloudera logo, Cloudera Impala, Impala, and any other product or service names or slogans contained in this document, except as otherwise disclaimed, are trademarks of Cloudera and its suppliers or licensors, and may not be copied, imitated or used, in whole or in part, without the prior written permission of Cloudera or the applicable trademark holder. Hadoop and the Hadoop elephant logo are trademarks of the Apache Software Foundation. All other trademarks, registered trademarks, product names and company names or logos mentioned in this document are the property of their respective owners. Reference to any products, services, processes or other information, by trade name, trademark, manufacturer, supplier or otherwise does not constitute or imply endorsement, sponsorship or recommendation thereof by us. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this document may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Cloudera. Cloudera may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document. Except as expressly provided in any written license agreement from Cloudera, the furnishing of this document does not give you any license to these patents, trademarks copyrights, or other intellectual property. The information in this document is subject to change without notice. Cloudera shall not be liable for any damages resulting from technical errors or omissions which may be present in this document, or from use of this document. Cloudera, Inc. 1001 Page Mill Road, Building 2 Palo Alto, CA 94304-1008 [email protected] US: 1-888-789-1488 Intl: 1-650-843-0595 www.cloudera.com Release Information Version: 2.5.16 Date: July 21, 2015 2 | Cloudera ODBC Driver for Apache Hive Table of Contents I NTRODUCTION 5 WINDOWS DRIVER 5 SYSTEM R EQUIREMENTS 5 INSTALLING THE D RIVER 6 V ERIFYING THE V ERSION N UMBER 6 CREATING A D ATA SOURCE N AME 7 CONFIGURING A DSN-LESS C ONNECTION 9 CONFIGURING AUTHENTICATION 11 CONFIGURING ADVANCED OPTIONS 14 CONFIGURING SERVER-S IDE PROPERTIES 15 CONFIGURING HTTP OPTIONS 16 CONFIGURING SSL V ERIFICATION 17 CONFIGURING THE TEMPORARY TABLE FEATURE 18 CONFIGURING L OGGING OPTIONS 18 LINUX DRIVER 20 SYSTEM R EQUIREMENTS 20 INSTALLING THE D RIVER 20 V ERIFYING THE V ERSION N UMBER 22 SETTING THE LD_LIBRARY_PATH E NVIRONMENT V ARIABLE 22 MAC OS X DRIVER 22 SYSTEM R EQUIREMENTS 22 INSTALLING THE D RIVER 23 V ERIFYING THE V ERSION N UMBER 23 SETTING THE DYLD_LIBRARY_PATH E NVIRONMENT V ARIABLE 23 AIX DRIVER 24 SYSTEM R EQUIREMENTS 24 INSTALLING THE D RIVER 24 V ERIFYING THE V ERSION N UMBER 25 SETTING THE LD_LIBRARY_PATH E NVIRONMENT V ARIABLE 25 DEBIAN D RIVER 26 SYSTEM R EQUIREMENTS 26 INSTALLING THE D RIVER 26 V ERIFYING THE V ERSION N UMBER 27 SETTING THE LD_LIBRARY_PATH E NVIRONMENT V ARIABLE 27 Cloudera ODBC Driver for Apache Hive | 3 INI FILE 30 CONFIGURING THE ODBCINST.INI FILE 32 CONFIGURING SERVICE DISCOVERY MODE 33 CONFIGURING AUTHENTICATION 33 CONFIGURING SSL V ERIFICATION 35 CONFIGURING L OGGING OPTIONS 36 FEATURES 37 SQL QUERY VERSUS HIVEQL QUERY 38 SQL CONNECTOR 38 DATA TYPES 38 CATALOG AND SCHEMA S UPPORT 39 HIVE_ SYSTEM TABLE 40 SERVER-S IDE PROPERTIES 40 TEMPORARY TABLE 40 GET TABLES W ITH QUERY 42 ACTIVE D IRECTORY 42 WRITE-BACK 42 DYNAMIC SERVICE DISCOVERY USING ZOOK EEPER 42 CONTACT US 42 APPENDIX A U SING A C ONNECTION STRING 44 DSN CONNECTIONS 44 DSN-LESS CONNECTIONS 44 APPENDIX B A UTHENTICATION OPTIONS 45 APPENDIX C C ONFIGURING K ERBEROS AUTHENTICATION FOR W INDOWS 47 ACTIVE D IRECTORY 47 MIT KERBEROS 47 APPENDIX D D RIVER CONFIGURATION OPTIONS 52 CONFIGURATION OPTIONS APPEARING IN THE U SER INTERFACE 52 CONFIGURATION OPTIONS HAVING ONLY KEY N AMES 69 APPENDIX E ODBC API CONFORMANCE LEVEL 4 | Cloudera ODBC Driver for Apache Hive 71 .INI FILE 31 CONFIGURING THE CLOUDERA.HIVEODBC .CONFIGURING ODBC CONNECTIONS FOR NON -WINDOWS PLATFORMS 28 FILES 28 SAMPLE F ILES 29 CONFIGURING THE E NVIRONMENT 29 CONFIGURING THE ODBC . Application developers may also find the information helpful. The Cloudera ODBC Driver for Apache Hive complies with the ODBC 3. ODBC is one the most established and widely supported APIs for connecting to and working with databases.Introduction Introduction The Cloudera ODBC Driver for Apache Hive is used for direct SQL and HiveQL access to Apache Hadoop / Hive distributions. Refer to your application for details on connecting via ODBC. enabling Business Intelligence (BI). For more information about ODBC. then the driver is configurable to pass the query through to the database for processing. and reporting on Hadoop / Hive-based data. Queries. which is a subset of SQL-92. analytics. The driver efficiently transforms an application’s SQL query into the equivalent form in HiveQL. If an application is Hive-aware. see http://www. For complete information about the ODBC specification.and 64-bit editions are supported): o Windows® XP with SP3 o Windows® Vista o Windows® 7 Professional and Enterprise o Windows® 8 Pro and Enterprise o Windows® Server 2008 R2 25 MB of available disk space Important: To install the driver. Each computer where you install the driver must meet the following minimum system requirements: l l One of the following operating systems (32. you must have Administrator privileges on the computer. Cloudera ODBC Driver for Apache Hive | 5 . At the heart of the technology is the ODBC driver.85). For more information about the differences between HiveQL and SQL. see the ODBC API Reference at http://msdn.aspx.simba.and 64-bit support for high-performance computing environments. see "Features" on page 37.52 data standard and adds important functionality such as Unicode and 32. are translated from SQL to HiveQL.microsoft. The Installation and Configuration Guide is suitable for users who are looking to access data residing within Hive from their desktop environment. including joins. The driver interrogates Hive to obtain schema information to present to a SQL-based application. Windows Driver System Requirements You install the Cloudera ODBC Driver for Apache Hive on client computers accessing data in a Hadoop cluster with the Hive service installed and running.com/resources/data-accessstandards-library.com/en-us/library/windows/desktop/ms714562 (v=vs. which connects an application to the database. Installing the Driver On 64-bit Windows operating systems.msi for 64-bit applications You can install both versions of the driver on the same computer. see http://www. click the Start button . To change the installation location. then click All Programs. Click Next 3. If you are using Windows 7 or earlier. type ODBC administrator. When the installation completes.12.pdf To install the Cloudera ODBC Driver for Apache Hive: 1. 0. you can execute 32. 0. and 1. then browse to the desired folder. and then click the ODBC Administrator search result corresponding to the bitness of the client application accessing data in Hadoop / Hive. Select the check box to accept the terms of the License Agreement if you agree. then click the Cloudera ODBC Driver for Apache Hive 2. double-click to run ClouderaHiveODBC32. click Next 5. 1.14.1.Windows Driver The driver supports Hive 0. on the Start screen. click Finish Verifying the Version Number If you need to verify the version of the Cloudera ODBC Driver for Apache Hive that is installed on your Windows machine. click Change. 0.0. To verify the version number: 1. Depending on the bitness of your client application. Click Install 6. 6 | Cloudera ODBC Driver for Apache Hive . You must use the version of the driver matching the bitness of the client application accessing data in Hadoop / Hive: l ClouderaHiveODBC32.and 64-bit applications transparently. Note: For an explanation of how to use ODBC on 64-bit editions of Windows.11. you can find the version number in the ODBC Data Source Administrator.13. and then click ODBC Administrator OR If you are using Windows 8 or later.msi for 32-bit applications l ClouderaHiveODBC64. and then click Next 4.msi 2.5 program group corresponding to the bitness of the client application accessing data in Hadoop / Hive.msi or ClouderaHiveODBC64.com/wp-content/uploads/2010/10/HOW-TO-32-bit-vs-64-bitODBC-Data-Source-Administrator. To accept the installation location.simba. and then click OK. Cloudera ODBC Driver for Apache Hive | 7 . in the Description field. click the Drivers tab. If you are using Windows 7 or earlier. and then click ODBC Administrator OR If you are using Windows 8 or later. 4. type a name for your DSN. In the ODBC Data Source Administrator.Windows Driver 2. click the System DSN tab. for information about DSN-less connections. OR To create a DSN that all users who log into Windows can use. click the User DSN tab. b) Optionally. see "Configuring a DSN-less Connection" on page 9.5 program group corresponding to the bitness of the client application accessing data in Hadoop / Hive. click the Drivers tab and then find the Cloudera ODBC Driver for Apache Hive in the list of ODBC drivers that are installed on your system. To create a Data Source Name: 1. click the Start button . Alternatively. 2. and then scroll down as needed to confirm that the Cloudera ODBC Driver for Apache Hive appears in the alphabetical list of ODBC drivers that are installed on your system. on the Start screen. To create a DSN that only the user currently logged into Windows can use. select Cloudera ODBC Driver for Apache Hive and then click Finish 6. then click All Programs. then Hive Server 1 is not supported. select Hive Server 1 or Hive Server 2 Note: If you are connecting through Apache ZooKeeper. In the Create New Data Source dialog box. type ODBC administrator. Click Add 5. and then click the ODBC Administrator search result corresponding to the bitness of the client application accessing data in Hadoop / Hive. Creating a Data Source Name Typically. c) In the Hive Server Type list. The version number is displayed in the Version column. then click the Cloudera ODBC Driver for Apache Hive 2. Use the options in the Cloudera ODBC Driver for Apache Hive DSN Setup dialog box to configure your DSN: a) In the Data Source Name field. In the ODBC Data Source Administrator. type relevant details about the DSN. you need to create a Data Source Name (DSN). after installing the Cloudera ODBC Driver for Apache Hive. 3. type the name of the database schema to use when a schema is not explicitly specified in a query. then type the IP address or host name of the Hive server. then type the number of the TCP port that the Hive server uses to listen for client connections. Note: You can still issue queries on other schemas by explicitly specifying the schema in the query. 8 | Cloudera ODBC Driver for Apache Hive . j) Optionally. For more information. Otherwise. Otherwise. select ZooKeeper e) In the Host(s) field. then type the namespace on ZooKeeper under which Hive Server 2 znodes are added. Note: Hive Server 1 does not support authentication. Use the following format. i) In the Authentication area. configure authentication as needed. see "Configuring Authentication" on page 11. To inspect your databases and determine the appropriate schema to use. type the show databases command at the Hive command prompt. h) In the ZooKeeper Namespace field. select No Service Discovery OR To enable the driver to discover Hive Server 2 services via the ZooKeeper service. g) In the Database field. if you selected ZooKeeper in step d.Windows Driver d) To connect to Hive without using the Apache ZooKeeper service. Most default configurations of Hive Server 2 require User Name authentication. type the name of the user to be delegated in the Delegation UID field. in the Service Discovery Mode list. if the operations against Hive are to be done on behalf of a user that is different than the authenticated user for the connection. To verify the authentication mechanism that you need to use for your connection. do not type a value in the field. OR If you selected ZooKeeper in step d. For more information. do not type a value in the field. then type a comma-separated list of ZooKeeper servers. Note: This option is applicable only when connecting to a Hive Server 2 instance that supports this feature. where zk_host is the IP address or host name of the ZooKeeper server and zk_port is the number of the port that the ZooKeeper server uses: zk_host1:zk_port1. check the configuration of your Hadoop / Hive distribution. if you selected No Service Discovery in step d. in the Service Discovery Mode list. if you selected No Service Discovery in step d. see "Authentication Options" on page 45.zk_host2:zk_port2 f) In the Port field. click OK Configuring a DSN-less Connection Some client applications provide support for connecting to a data source using a driver without a Data Source Name (DSN). To close the ODBC Data Source Administrator. click HTTP Options. The following section explains how to use the driver configuration tool. o) To configure server-side properties. Cloudera ODBC Driver for Apache Hive | 9 . see "Configuring Server-Side Properties" on page 15.14 or later. 7. Important: When connecting to Hive 0. click OK 9. m) To configure client-server verification over SSL. click Advanced Options and then click Temporary Table Configuration. see "Configuring the Temporary Table Feature" on page 18 and "Temporary Table" on page 40. n) To configure advanced driver options. then confirm that the settings in the Cloudera ODBC Driver for Apache Hive DSN Setup dialog box are correct. see "Configuring Logging Options" on page 18. For more information. see "Configuring SSL Verification" on page 17. p) To configure the Temporary Table feature. the Temporary Tables feature is always enabled and you do not need to configure it in the driver. For more information. see "DSN-less Connections" on page 44. Note: If the connection fails. For more information. select the transport protocol to use in the Thrift layer. and then click OK. you can use a connection string or the Cloudera Hive ODBC Driver Configuration tool that is installed with the Cloudera ODBC Driver for Apache Hive. click Logging Options. see "Configuring Advanced Options" on page 14.Windows Driver k) In the Thrift Transport list. Contact your Hive server administrator as needed. To configure a DSN-less connection. Review the results as needed. Note: The HTTP options are available only when the Thrift Transport option is set to HTTP. click SSL Options. For information about using connection strings. For more information. For more information. For more information. click Test. 8. l) To configure HTTP options such as custom headers. To save your settings and close the Cloudera ODBC Driver for Apache Hive DSN Setup dialog box. click Advanced Options and then click Server Side Properties. see "Configuring HTTP Options" on page 16. To test the connection. q) To configure logging behavior for the driver. click Advanced Options. Otherwise. In the ZooKeeper Namespace field. To connect to Hive without using the Apache ZooKeeper service. click the Start button . select Hive Server 1 or Hive Server 2 Note: If you are connecting through Apache ZooKeeper. then Hive Server 1 is not supported. click the arrow button at the bottom of the Start screen. Note: You must have administrator access to the computer in order to run this application because it makes changes to the registry. and then click OK if prompted for administrator permission to make modifications to the computer. configure authentication as needed. check the configuration of your Hadoop / Hive distribution. select No Service Discovery OR To enable the driver to discover Hive Server 2 services via the ZooKeeper service. and then click the Cloudera ODBC Driver for Apache Hive 2. To verify the authentication mechanism that you need to use for your connection. 2. type the name of the user to be delegated in the Delegation UID field. 10 | Cloudera ODBC Driver for Apache Hive . OR If you are using Windows 8 or later. For more information. Optionally.5 program group corresponding to the bitness of the client application accessing data in Hadoop / Hive. see "Configuring Authentication" on page 11. then click All Programs. 4. In the Authentication area. Most default configurations of Hive Server 2 require User Name authentication. do not type a value in the field. In the Hive Server Type list. in the Service Discovery Mode list. 3. if you selected ZooKeeper in step 4. 7. 6. For more information. select ZooKeeper 5. If you are using Windows 7 or earlier.5 program group corresponding to the bitness of the client application accessing data in Hadoop / Hive. and then find the Cloudera ODBC Driver for Apache Hive 2. in the Service Discovery Mode list. if the operations against Hive are to be done on behalf of a user that is different than the authenticated user for the connection. see "Authentication Options" on page 45.Windows Driver To configure a DSN-less connection using the driver configuration tool: 1. Click Driver Configuration. Note: Hive Server 1 does not support authentication. then type the namespace on ZooKeeper under which Hive Server 2 znodes are added. However. see "Configuring SSL Verification" on page 17. click Advanced Options. the Cloudera Hive ODBC Driver Configuration tool enables you to configure authentication without using a DSN. 10. For information about how to determine the type of authentication your Hive server requires. click Advanced Options and then click Temporary Table Configuration. For more information. see "Configuring Server-Side Properties" on page 15. To connect to a Hive server. Important: When connecting to Hive 0. To configure client-server verification over SSL. click Advanced Options and then click Server Side Properties. 11. applications that are not Hive Server 2 aware and that connect using a DSN-less connection do not have a facility for passing authentication credentials to the Cloudera ODBC Driver for Apache Hive for a connection. For more information. For more information. Cloudera ODBC Driver for Apache Hive | 11 . see "Configuring HTTP Options" on page 16. click SSL Options. To configure server-side properties. see Appendix B "Authentication Options" on page 45. Note: The HTTP options are available only when the Thrift Transport option is set to HTTP. To save your settings and close the Cloudera Hive ODBC Driver Configuration tool. the Temporary Tables feature is always enabled and you do not need to configure it in the driver. click HTTP Options. click OK Configuring Authentication Some Hive servers are configured to require authentication for access.Windows Driver Note: This option is applicable only when connecting to a Hive Server 2 instance that supports this feature. Normally. ODBC applications that connect to Hive Server 2 using a DSN can pass in authentication credentials by defining them in the DSN. you must configure the Cloudera ODBC Driver for Apache Hive to use the authentication mechanism that matches the access requirements of the server and provides the necessary credentials. In the Thrift Transport list. To configure advanced options. To configure HTTP options such as custom headers. select the transport protocol to use in the Thrift layer. To configure authentication for a connection that uses a DSN. see "Temporary Table" on page 40 and "Configuring the Temporary Table Feature" on page 18. use the ODBC Data Source Administrator. 9. 13. To configure the Temporary Table feature. For more information. 8. 14. For more information.14 or later. see "Configuring Advanced Options" on page 14. 12. you must use No Authentication. and then click Configure OR To access authentication options for a DSN-less connection. To save your settings and close the dialog box. For more information. open the Cloudera Hive ODBC Driver Configuration tool. open the ODBC Data Source Administrator where you created the DSN. the Binary transport protocol is not supported. To access authentication options for a DSN. In the Mechanism list. then click SSL Options to configure SSL for the connection. open the ODBC Data Source Administrator where you created the DSN. then select the DSN. select No Authentication 3. SASL is not supported. 5. For more information. 2. SASL is not supported. Important: When using this authentication mechanism. Using No Authentication When connecting to a Hive server of type Hive Server 1. When you use No Authentication.Windows Driver Important: Credentials defined in a DSN take precedence over credentials configured using the driver configuration tool. 2. To configure Kerberos authentication: 1. then select the DSN. and then click Configure OR To access authentication options for a DSN-less connection. If the Hive server is configured to use SSL. select Kerberos 12 | Cloudera ODBC Driver for Apache Hive . Credentials configured using the driver configuration tool apply for all connections that are made using a DSN-less connection unless the client application is Hive Server 2 aware and requests credentials from the user. see "Configuring SSL Verification" on page 17. To configure a connection without authentication: 1. click OK Using Kerberos Kerberos must be installed and configured before you can use this authentication mechanism. 4. To access authentication options for a DSN. open the Cloudera Hive ODBC Driver Configuration tool. see Appendix C "Configuring Kerberos Authentication for Windows" on page 47. When you use Kerberos authentication. In the Thrift Transport list. select the transport protocol to use in the Thrift layer. In the Mechanism list. This authentication mechanism is available only for Hive Server 2. type the fully qualified domain name of the Hive Server 2 host. 6. type _HOST in the Host FQDN field. When you use User Name authentication. In the User Name field. In the Mechanism list. facilitating database tracking. Note: To use the Hive server host name as the fully qualified domain name for Kerberos authentication. 2. For more information. To save your settings and close the dialog box. SSL is not supported and you must use SASL as the Thrift transport protocol. see "Configuring SSL Verification" on page 17. To configure User Name authentication: 1. If the Hive server is configured to use SSL. 5. 7. click OK Using User Name This authentication mechanism requires a user name but not a password.Windows Driver 3. then type the Kerberos realm of the Hive Server 2 host in the Realm field. type the service name of the Hive server. then click SSL Options to configure SSL for the connection. The user name labels the session. select SASL 5. In the Service Name field. the Binary transport protocol is not supported. Cloudera ODBC Driver for Apache Hive | 13 . In the Host FQDN field. This authentication mechanism is available only for Hive Server 2. select User Name 3. In the Thrift Transport list. In the Thrift Transport list. To access authentication options for a DSN. and then click Configure OR To access authentication options for a DSN-less connection. open the ODBC Data Source Administrator where you created the DSN. To save your settings and close the dialog box. 4. OR To use the default realm defined in your Kerberos setup. open the Cloudera Hive ODBC Driver Configuration tool. If your Kerberos setup does not define a default realm or if the realm of your Hive Server 2 host is not the default. Most default configurations of Hive Server 2 require User Name authentication. leave the Realm field empty. then select the DSN. Important: When using this authentication mechanism. click OK Using User Name and Password This authentication mechanism requires a user name and a password. 8. type an appropriate user name for accessing the Hive server. 4. select the transport protocol to use in the Thrift layer. open the Cloudera Hive ODBC Driver Configuration tool. and then click Advanced Options 2. click OK Configuring Advanced Options You can configure advanced options to modify the behavior of the driver. To allow driver-wide configurations to take precedence over connection and DSN settings. then click SSL Options to configure SSL for the connection. select the Fast SQLPrepare check box. 14 | Cloudera ODBC Driver for Apache Hive . and then click Configure OR To access authentication options for a DSN-less connection. type an appropriate user name for accessing the Hive server. open the ODBC Data Source Administrator where you created the DSN. 4. To use the asynchronous version of the API call against Hive for executing a query. 7. see "Configuring SSL Verification" on page 17. open the Cloudera Hive ODBC Driver Configuration tool. open the ODBC Data Source Administrator where you created the DSN. then click Configure. 5. In the User Name field. 6. To access advanced options for a DSN. select the Use Native Query check box. select the transport protocol to use in the Thrift layer. 5. select User Name and Password 3. select the Use Async Exec check box. select the Driver Config Take Precedence check box. To disable the SQL Connector feature. 3. To configure advanced options: 1. select the Get Tables With Query check box. then select the DSN.0 or later. type the password corresponding to the user name you typed in step 3.12. In the Password field. 6.Windows Driver This authentication mechanism is available only for Hive Server 2. In the Thrift Transport list. To defer query execution to SQLExecute. To configure User Name and Password authentication: 1. and then click Advanced Options OR To access advanced options for a DSN-less connection. To access authentication options for a DSN. Note: This option is applicable only when connecting to a Hive cluster running Hive 0. 2. To save your settings and close the dialog box. In the Mechanism list. If the Hive server is configured to use SSL. then select the DSN. 4. For more information. To retrieve the names of tables in a database by using the SHOW TABLES query. To save your settings and close the Advanced Options dialog box. 8. click Add. To create a server-side property. then select the DSN and click Configure. To enable the driver to return the hive_system table for catalog function calls such as SQLTables and SQLColumns. and then click OK Cloudera ODBC Driver for Apache Hive | 15 . then click Advanced Options. 10. select the Unicode SQL character types check box. To handle Kerberos authentication using the SSPI plugin instead of MIT Kerberos by default. type the maximum number of digits to the right of the decimal point for numeric data types. 14. 11. click OK Configuring Server-Side Properties You can use the driver to apply configuration properties to the Hive server. In the Binary column length field. type the number of seconds that an operation can remain idle before it is closed. type the maximum data length for STRING columns. open the ODBC Data Source Administrator where you created the DSN. then type appropriate values in the Key and Value fields.Windows Driver Note: This option is applicable only when connecting to Hive Server 2. select the Show System Table check box. Note: This option is applicable only when asynchronous query execution is being used against Hive Server 2 instances. In the Rows fetched per block field. and then click Server Side Properties OR To configure server-side properties for a DSN-less connection. To configure server-side properties: 1. type the number of rows to be fetched per block. select the Use Only SSPI check box. 9. To enable the driver to return SQL_WVARCHAR instead of SQL_VARCHAR for STRING and VARCHAR columns. and SQL_WCHAR instead of SQL_CHAR for CHAR columns. 7. open the Cloudera Hive ODBC Driver Configuration tool. type the maximum data length for BINARY columns. 12. In the Socket Timeout field. In the Decimal column scale field. then click Advanced Options. To configure server-side properties for a DSN. In the Default string column length field. and then click Server Side Properties 2. 13. 15. select the Apply Server Side Properties with Queries check box. If you are configuring HTTP for a DSN. click OK Configuring HTTP Options You can configure options such as custom headers when using the HTTP transport protocol in the Thrift layer. You can also execute the set -v query after connecting using the driver. OR To configure the driver to use a more efficient method for applying server-side properties that does not involve additional network round-tripping. open the Cloudera Hive ODBC Driver Configuration tool and then ensure that the Thrift Transport option is set to HTTP 2. To access HTTP options. To configure the driver to apply each server-side property by executing a query when opening a session to the Hive server. To force the driver to convert server-side property key names to all lower case characters. clear the Apply Server Side Properties with Queries check box. In the confirmation dialog box. In the HTTP Path field. then click Edit. Note: The more efficient method is not available for Hive Server 1. and then click Remove. To configure HTTP options: 1. and it might not be compatible with some Hive Server 2 builds. 3. click Yes 5. select the property from the list. 7. If the server-side properties do not take effect when the check box is clear. select the property from the list. open the ODBC Data Source Administrator where you created the DSN. click HTTP Options Note: The HTTP options are available only when the Thrift Transport option is set to HTTP. type set -v at the Hive CLI command line or Beeline. then click Configure. and then click OK 4. To edit a server-side property. and then ensure that the Thrift Transport option is set to HTTP OR If you are configuring HTTP for a DSN-less connection. 6. then update the Key and Value fields as needed. type the partial URL corresponding to the Hive server. select the Convert Key Name to Lower Case check box.Windows Driver Note: For a list of all Hadoop and Hive server-side properties that your implementation supports. To save your settings and close the Server Side Properties dialog box. then select the DSN. 16 | Cloudera ODBC Driver for Apache Hive . 3. To delete a server-side property. then select the check box. open the Cloudera Hive ODBC Driver Configuration tool. leave the Trusted Certificates field empty. 3. and then click OK 6. click Add. 7. To allow the common name of a CA-issued SSL certificate to not match the host name of the Hive server. specify the full path of the PEM file containing the client's certificate. select the Allow Common Name Host Name Mismatch check box. To configure SSL verification: 1. 4. then type appropriate values in the Key and Value fields. OR To use the trusted CA certificates PEM file that is installed with the driver. click OK Configuring SSL Verification You can configure verification between the client and the Hive server over SSL. To access SSL options for a DSN. specify the full path of the file containing the client's private key. In the confirmation dialog box. To save the password. specify the full path to the file in the Trusted Certificates field. select the Two Way SSL check box and then do the following: a) In the Client Certificate File field. b) In the Client Private Key File field. To configure the driver to load SSL certificates from a specific PEM file when verifying the server. click OK Cloudera ODBC Driver for Apache Hive | 17 . and then click SSL Options 2. then click Configure. select the header from the list. and then click Remove. Important: The password will be obscured (not saved in plain text). c) If the private key file is protected with a password. it is still possible for the encrypted password to be copied and used. type the password in the Client Private Key Password field. select the Allow Self-signed Server Certificate check box. select the header from the list. and then click SSL Options OR To access advanced options for a DSN-less connection. Select the Enable SSL check box. 6. To save your settings and close the SSL Options dialog box. To save your settings and close the HTTP Options dialog box. To edit a custom HTTP header. click Yes 7. then update the Key and Value fields as needed. 5. To delete a custom HTTP header. open the ODBC Data Source Administrator where you created the DSN. However. To allow self-signed certificates from the server. If you want to configure two-way SSL verification.Windows Driver 4. then select the DSN. select the Save Password (Encrypted) check box. and then click OK 5. then click Edit. To create a custom HTTP header. open the Cloudera Hive ODBC Driver Configuration tool. then select the DSN and click Configure. In the Temp Table TTL field. Important: When connecting to Hive 0.apache. In addition to functionality provided in the Cloudera ODBC Driver for Apache Hive. To configure the Temporary Table feature: 1. and then click Temporary Table Configuration OR To configure the temporary table feature for a DSN-less connection. In the Web HDFS Port field. click OK Configuring Logging Options To help troubleshoot issues.12. type the host name or IP address of the machine hosting both the namenode of your Hadoop cluster and the WebHDFS service. 3.Windows Driver Configuring the Temporary Table Feature You can configure the driver to create temporary tables. open the ODBC Data Source Administrator where you created the DSN. then the host name of the Hive server will be used. In the Data file HDFS dir field.14 or later. To save your settings and close the Temporary Table Configuration dialog box. To enable the Temporary Table feature. For more information about this feature.org/jira/browse/HIVE4554). To configure the temporary table feature for a DSN. then click Advanced Options. the ODBC Data Source Administrator provides tracing functionality. type the number of minutes that a temporary table is guaranteed to exist in Hive after it is created. HDFS paths with space characters do not work with versions of Hive prior to 0. 7. 6. the Temporary Tables feature is always enabled and you do not need to configure it in the driver. If this field is left blank. type the name of the HDFS user that the driver will use to create the necessary files for supporting the Temporary Table feature. In the HDFS User field. 8. 4. you can enable logging. type the HDFS directory that the driver will use to store the necessary files for supporting the Temporary Table feature. and then click Temporary Table Configuration 2. 5. 18 | Cloudera ODBC Driver for Apache Hive .0. Note: Due to a problem in Hive (see https://issues. see "Temporary Table" on page 40. select the Enable Temporary Table check box. then click Advanced Options. In the Web HDFS Host field. including details about the statement syntax used for temporary tables. type the WebHDFS port for the namenode. ERROR Logs error events that might still allow the driver to continue running. Otherwise. then click Configure.log at the location you specify using the Log Path field. To enable the logging functionality available in the Cloudera ODBC Driver for Apache Hive: 1. 5. DEBUG Logs detailed information that is useful for debugging the driver. then select the DSN. in order from least verbose to most verbose. FATAL Logs very severe error events that will lead the driver to abort. Table 1. Click OK Cloudera ODBC Driver for Apache Hive | 19 . The Cloudera ODBC Driver for Apache Hive produces a log file named HiveODBC_driver. In the Log Path field. Table 1 lists the logging levels provided by the Cloudera ODBC Driver for Apache Hive. do not type a value in the field. If requested by Technical Support. 4. Logging decreases performance and can consume a large quantity of disk space. and then click Logging Options 2. select LOG_OFF 3. INFO Logs general information that describes the progress of the driver. select the desired level of information to include in log files. open the ODBC Data Source Administrator where you created the DSN. Click OK 6. To disable Cloudera ODBC Driver for Apache Hive logging: 1. then click Configure. 3. type the full path to the folder where you want to save log files. and then click Logging Options 2. In the Log Level list. To access logging options. To access logging options. then select the DSN. In the Log Level list. TRACE Logs more detailed information than the DEBUG level.Windows Driver Important: Only enable logging long enough to capture an issue. The driver allows you to set the amount of detail included in log files. Cloudera ODBC Driver for Apache Hive Logging Levels Logging Level Description OFF Disables all logging. open the ODBC Data Source Administrator where you created the DSN. Restart your ODBC application to ensure that the new settings take effect. WARNING Logs potentially harmful situations. type the name of the component for which to log messages in the Log Namespace field. 0. In the ODBC Data Source Administrator.11. click Start Tracing Now To stop ODBC Data Source Administrator tracing: On the Tracing tab in the ODBC Data Source Administrator. 0. and Release is the release number for this version of the driver.LinuxDistro. if the client application is 64-bit. In the Log File Path area.14. and then click Save 3. click Browse. Installing the Driver There are two versions of the driver for Linux: l ClouderaHiveODBC-32bit-Version-Release. Note that 64-bit editions of Linux support both 32.1.rpm for the 64-bit driver Version is the version number of the driver.rpm for the 32-bit driver l ClouderaHiveODBC-Version-Release. Each computer where you install the driver must meet the following minimum system requirements: l One of the following distributions (32.and 64-bit editions are supported): o Red Hat® Enterprise Linux® (RHEL) 5. browse to the location where you want to save the log file. and 1.0 o SUSE Linux Enterprise Server (SLES) 11 l 45 MB of available disk space l One of the following ODBC driver managers installed: o iODBC 3.x86_64.and 64-bit 20 | Cloudera ODBC Driver for Apache Hive . then you should install the 64-bit driver.Linux Driver To start tracing using the ODBC Data Source Administrator: 1.com/kb/274551 Linux Driver System Requirements You install the Cloudera ODBC Driver for Apache Hive on client computers accessing data in a Hadoop cluster with the Hive service installed and running. In the Select ODBC Log File dialog box.microsoft. For example. click the Tracing tab.0 or 6.i686.52. 0.12.0 o CentOS 5. The bitness of the driver that you select should match the bitness of the client application accessing your Hadoop / Hive-based data. 1. click Stop Tracing Now For more information about tracing using the ODBC Data Source Administrator. 2.LinuxDistro.2. On the Tracing tab.7 or later o unixODBC 2. see the article How to Generate an ODBC Trace with ODBC Data Source Administrator at http://support.13.0 or 6. 0.12 or later The driver supports Hive 0. then type a descriptive file name in the File name field. Important: Ensure that you install the driver using the RPM corresponding to your Linux distribution. In Red Hat Enterprise Linux or CentOS. Verify the bitness of your intended application and install the appropriate version of the driver. then navigate to the folder containing the driver RPM packages to install.22-7 or above If the package manager in your Linux distribution cannot resolve the dependencies automatically when installing the driver. Cloudera ODBC Driver for Apache Hive | 21 .txt file that provides plain text installation and configuration instructions.Linux Driver applications. and a Readme. and then type the following at the command line.ini configuration file.hiveodbc. log in as the root user.ini configuration file.22-7 or above l cyrus-sasl-plain-2.ini /opt/cloudera/hiveodbc/lib/32 contains the 32-bit shared libraries and the cloudera.hiveodbc.1. and then type the following at the command line. The Cloudera ODBC Driver for Apache Hive driver files are installed in the following directories: l l l l l /opt/cloudera/hiveodbc contains release notes.1. where RPMFileName is the file name of the RPM package containing the version of the driver that you want to install: yum --nogpgcheck localinstall RPMFileName OR In SUSE Linux Enterprise Server. log in as the root user. /opt/cloudera/hiveodbc/ErrorMessages contains error message files required by the driver. /opt/cloudera/hiveodbc/lib/64 contains the 64-bit shared libraries and the cloudera. then download and manually install the packages required by the version of the driver that you want to install. /opt/cloudera/hiveodbc/Setup contains sample configuration files named odbc. the Cloudera ODBC Driver for Apache Hive Installation and Configuration Guide in PDF format.22-7 or above l cyrus-sasl-gssapi-2. To install the Cloudera ODBC Driver for Apache Hive: 1.ini and odbcinst. where RPMFileName is the file name of the RPM package containing the version of the driver that you want to install: zypper install RPMFileName The Cloudera ODBC Driver for Apache Hive depends on the following resources: l cyrus-sasl-2. then navigate to the folder containing the driver RPM packages to install.1. and 64bit client applications.14. see "Configuring ODBC Connections for Non-Windows Platforms" on page 28. 22 | Cloudera ODBC Driver for Apache Hive . and 1. 1. run the following command: yum list | grep ClouderaHiveODBC OR Run the following command: rpm -qa | grep ClouderaHiveODBC The command returns information about the Cloudera ODBC Driver for Apache Hive that is installed on your machine.1. Setting the LD_LIBRARY_PATH Environment Variable The LD_LIBRARY_PATH environment variable must include the paths to the installed ODBC driver manager libraries. 0. including the version number. To verify the version number: At the command prompt. Mac OS X Driver System Requirements You install the Cloudera ODBC Driver for Apache Hive on client computers accessing data in a Hadoop cluster with the Hive service installed and running. Each computer where you install the driver must meet the following minimum system requirements: l Mac OS X version 10.8 or later l 100 MB of available disk space l iODBC 3. 0.7 or later The driver supports Hive 0.6. then set LD_LIBRARY_ PATH as follows: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib For information about how to set environment variables permanently.0. you can query the version number through the command-line interface.12. For information about creating ODBC connections using the Cloudera ODBC Driver for Apache Hive. For example.Mac OS X Driver Verifying the Version Number If you need to verify the version of the Cloudera ODBC Driver for Apache Hive that is installed on your Linux machine. if ODBC driver manager libraries are installed in /usr/local/lib. refer to your Linux shell documentation.11. 0.52. The driver supports both 32.13. Mac OS X Driver Installing the Driver The Cloudera ODBC Driver for Apache Hive driver files are installed in the following directories: l l l l /opt/cloudera/hiveodbc contains release notes and the Cloudera ODBC Driver for Apache Hive Installation and Configuration Guide in PDF format. /opt/cloudera/hiveodbc/ErrorMessages contains error messages required by the driver. /opt/cloudera/hiveodbc/Setup contains sample configuration files named odbc.ini and odbcinst.ini /opt/cloudera/hiveodbc/lib/universal contains the driver binaries and the cloudera.hiveodbc.ini configuration file. To install the Cloudera ODBC Driver for Apache Hive: 1. Double-click ClouderaHiveODBC.dmg to mount the disk image. 2. Double-click ClouderaHiveODBC.pkg to run the installer. 3. In the installer, click Continue 4. On the Software License Agreement screen, click Continue, and when the prompt appears, click Agree if you agree to the terms of the License Agreement. 5. Optionally, to change the installation location, click Change Install Location, then select the desired location, and then click Continue 6. To accept the installation location and begin the installation, click Install 7. When the installation completes, click Close Verifying the Version Number If you need to verify the version of the Cloudera ODBC Driver for Apache Hive that is installed on your Mac OS X machine, you can query the version number through the Terminal. To verify the version number: At the Terminal, run the following command: pkgutil --info cloudera.hiveodbc The command returns information about the Cloudera ODBC Driver for Apache Hive that is installed on your machine, including the version number. Setting the DYLD_LIBRARY_PATH Environment Variable The DYLD_LIBRARY_PATH environment variable must include the paths to the installed ODBC driver manager libraries. For example, if ODBC driver manager libraries are installed in /usr/local/lib, then set DYLD_ LIBRARY_PATH as follows: export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/lib Cloudera ODBC Driver for Apache Hive | 23 AIX Driver For information about how to set environment variables permanently, refer to your Mac OS X shell documentation. For information about creating ODBC connections using the Cloudera ODBC Driver for Apache Hive, see "Configuring ODBC Connections for Non-Windows Platforms" on page 28. AIX Driver System Requirements You install the Cloudera ODBC Driver for Apache Hive on client computers accessing data in a Hadoop cluster with the Hive service installed and running. Each computer where you install the driver must meet the following minimum system requirements: l IBM AIX 5.3, 6.1, or 7.1 (32- and 64-bit editions are supported) l 150 MB of available disk space l One of the following ODBC driver managers installed: o iODBC 3.52.7 or later o unixODBC 2.3.0 or later The driver supports Hive 0.11, 0.12, 0.13, 0.14, 1.0, and 1.1. Installing the Driver There are two versions of the driver for AIX: l ClouderaHiveODBC-32bit-Version-Release.ppc.rpm for the 32-bit driver l ClouderaHiveODBC-Version-Release.ppc.rpm for the 64-bit driver Version is the version number of the driver, and Release is the release number for this version of the driver. The bitness of the driver that you select should match the bitness of the client application accessing your Hadoop / Hive-based data. For example, if the client application is 64-bit, then you should install the 64-bit driver. Note that 64-bit editions of AIX support both 32- and 64-bit applications. Verify the bitness of your intended application and install the appropriate version of the driver. The Cloudera ODBC Driver for Apache Hive driver files are installed in the following directories: l l l /opt/cloudera/hiveodbc contains release notes, the Cloudera ODBC Driver for Apache Hive Installation and Configuration Guide in PDF format, and a Readme.txt file that provides plain text installation and configuration instructions. /opt/cloudera/hiveodbc/ErrorMessages contains error message files required by the driver. /opt/cloudera/hiveodbc/Setup contains sample configuration files named odbc.ini and odbcinst.ini 24 | Cloudera ODBC Driver for Apache Hive AIX Driver l l /opt/cloudera/hiveodbc/lib/32 contains the 32-bit driver and the cloudera.hiveodbc.ini configuration file. /opt/cloudera/hiveodbc/lib/64 contains the 64-bit driver and the cloudera.hiveodbc.ini configuration file. To install the Cloudera ODBC Driver for Apache Hive: 1. Log in as the root user, then navigate to the folder containing the driver RPM packages to install, and then type the following at the command line, where RPMFileName is the file name of the RPM package containing the version of the driver that you want to install: rpm --install RPMFileName Verifying the Version Number If you need to verify the version of the Cloudera ODBC Driver for Apache Hive that is installed on your AIX machine, you can query the version number through the command-line interface. To verify the version number: At the command prompt, run the following command: rpm -qa | grep ClouderaHiveODBC The command returns information about the Cloudera ODBC Driver for Apache Hive that is installed on your machine, including the version number. Setting the LD_LIBRARY_PATH Environment Variable The LD_LIBRARY_PATH environment variable must include the path to the installed ODBC driver manager libraries. For example, if ODBC driver manager libraries are installed in /usr/local/lib, then set LD_LIBRARY_ PATH as follows: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib For information about how to set environment variables permanently, refer to your AIX shell documentation. For information about creating ODBC connections using the Cloudera ODBC Driver for Apache Hive, see "Configuring ODBC Connections for Non-Windows Platforms" on page 28. Cloudera ODBC Driver for Apache Hive | 25 1.Debian Driver Debian Driver System Requirements You install the Cloudera ODBC Driver for Apache Hive on client computers accessing data in a Hadoop cluster with the Hive service installed and running. /opt/cloudera/hiveodbc/Setup contains sample configuration files named odbc. For example.and 64-bit applications.04 LTS) l 45 MB of available disk space l One of the following ODBC driver managers installed: o iODBC 3.12. 0. Verify the bitness of your intended application and install the appropriate version of the driver.0.7 or later o unixODBC 2. The Cloudera ODBC Driver for Apache Hive driver files are installed in the following directories: l l l l l /opt/cloudera/hiveodbc contains release notes.hiveodbc.and 64-bit client applications.04 LTS and Ubuntu 14. 26 | Cloudera ODBC Driver for Apache Hive .14.ini configuration file. Installing the Driver There are two versions of the driver for Debian: l ClouderaHiveODBC-32bit-Version-Release_i386. then you should install the 64-bit driver. It supports both 32. /opt/cloudera/hiveodbc/lib/64 contains the 64-bit shared libraries and the cloudera.11.deb for the 64-bit driver Version is the version number of the driver.deb for the 32-bit driver l ClouderaHiveODBC-Version-Release_amd64.txt file that provides plain text installation and configuration instructions. and Release is the release number for this version of the driver. Each computer where you install the driver must meet the following minimum system requirements: l Debian 7 (Ubuntu 12. if the client application is 64-bit. the Cloudera ODBC Driver for Apache Hive Installation and Configuration Guide in PDF format. and a Readme.ini and odbcinst.12 or later The driver supports Hive 0. 0.52. /opt/cloudera/hiveodbc/ErrorMessages contains error message files required by the driver.13.ini configuration file. 1. and 1.2. 0. The bitness of the driver that you select should match the bitness of the client application accessing your Hadoop / Hive-based data. Note that 64-bit editions of Debian support both 32.ini /opt/cloudera/hiveodbc/lib/32 contains the 32-bit shared libraries and the cloudera.hiveodbc. and double-click ClouderaHiveODBC-32bit-Version-Release_i386. then set LD_LIBRARY_ PATH as follows: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib For information about how to set environment variables permanently. then navigate to the folder containing the driver Debian packages to install.1. depending on the version of the driver that you installed.22-7 or above l cyrus-sasl-gssapi-2. if ODBC driver manager libraries are installed in /usr/local/lib. then copy the license file into the /opt/cloudera/hiveodbc/lib/32 or /opt/cloudera/hiveodbc/lib/64 folder.22-7 or above l cyrus-sasl-plain-2. For example.Debian Driver To install the Cloudera ODBC Driver for Apache Hive: 1.1.deb or ClouderaHiveODBC-Version-Release_amd64. refer to your Ubuntu shell documentation. Setting the LD_LIBRARY_PATH Environment Variable The LD_LIBRARY_PATH environment variable must include the path to the installed ODBC driver manager libraries. If you received a license file via e-mail. you can query the version number through the command-line interface. run the following command: dpkg -l | grep ClouderaHiveODBC The command returns information about the Cloudera ODBC Driver for Apache Hive that is installed on your machine. The Cloudera ODBC Driver for Apache Hive depends on the following resources: l cyrus-sasl-2.1. In Ubuntu. Note: To avoid security issues. Cloudera ODBC Driver for Apache Hive | 27 .22-7 or above If the package manager in your Ubuntu distribution cannot resolve the dependencies automatically when installing the driver. Verifying the Version Number If you need to verify the version of the Cloudera ODBC Driver for Apache Hive that is installed on your Debian machine. Follow the instructions in the installer to complete the installation process.deb 2. including the version number. To verify the version number: At the command prompt. log in as the root user. you may need to save the license file on your local computer prior to copying the file into the folder. 3. then download and manually install the packages required by the version of the driver that you want to install. hiveodbc.ini file in the /lib subfolder provides default settings for most configuration options available in the Cloudera ODBC Driver for Apache Hive. For 28 | Cloudera ODBC Driver for Apache Hive . whereas configuration options set in an odbc. the following configuration files residing in the user’s home directory are used: l . By default. Configuration options set in odbc.ini.ini file is required.ini File" on page 30 l "Configuring the odbcinst. Also.ini File" on page 32 l "Configuring Service Discovery Mode" on page 33 l "Configuring Authentication" on page 33 l "Configuring SSL Verification" on page 35 l "Configuring Logging Options" on page 36 Files ODBC driver managers use configuration files to define and configure ODBC data sources and drivers. see "Configuring ODBC Connections for Non-Windows Platforms" on page 28. and it is optional.Configuring ODBC Connections for Non-Windows Platforms For information about creating ODBC connections using the Cloudera ODBC Driver for Apache Hive.ini file. which is located in one of the following directories depending on the version of the driver that you are using: l /opt/cloudera/hiveodbc/lib/32 for the 32-bit driver on Linux/AIX/Debian l /opt/cloudera/hiveodbc/lib/64 for the 64-bit driver on Linux/AIX/Debian l /opt/cloudera/hiveodbc/lib/universal for the driver on Mac OS X The cloudera.ini file are specific to a connection.ini take precedence over configuration options set in cloudera.odbc.odbcinst. Configuring ODBC  Connections for Non-Windows Platforms The following sections describe how to configure ODBC connections when using the Cloudera ODBC Driver for Apache Hive with non-Windows platforms: l "Files" on page 28 l "Sample Files" on page 29 l "Configuring the Environment" on page 29 l "Configuring the odbc. by default the Cloudera ODBC Driver for Apache Hive is configured using the cloudera.ini is used to define ODBC drivers. Configuration options set in a cloudera.hiveodbc.hiveodbc. You can set driver configuration options in your odbc.hiveodbc. l .ini is used to define ODBC data sources. and it is required for DSNs.hiveodbc.hiveodbc. Note: The cloudera.ini file apply to all connections.ini and cloudera.ini files.hiveodbc.ini File" on page 31 l "Configuring the cloudera. ini files are located in /etc and your odbcinst.) is hidden.ini. If the configuration files do not exist in the home directory.ini file is located in /usr/local/odbc. l Set CLOUDERAHIVEINI to point to your cloudera. If the CLOUDERAHIVEINI environment variable is defined. Configuring the Environment Optionally.ini file. For example.Configuring ODBC Connections for Non-Windows Platforms information about the configuration options available for controlling the behavior of DSNs that are using the Cloudera ODBC Driver for Apache Hive.ini and cloudera.ini These sample configuration files provide preset values for settings related to the Cloudera ODBC Driver for Apache Hive. then the file names must begin with a period (. you can use three environment variables—ODBCINI. Sample Files The driver installation contains the following sample configuration files in the Setup directory: l odbc. then use the sample configuration files as a guide to modify the existing configuration files. and CLOUDERAHIVEINI—to specify different locations for the odbc. see Appendix D "Driver Configuration Options" on page 52. l Set ODBCSYSINI to point to the directory containing the odbcinst.ini. For odbc.ini file.ini configuration files by doing the following: l Set ODBCINI to point to your odbc. odbcinst.hiveodbc. including the file name. 2. then set the environment variables as follows: export ODBCINI=/etc/odbc. Important: CLOUDERAHIVEINI must specify the full path. and cloudera.ini.hiveodbc.hiveodbc.hiveodbc.ini file.ini export ODBCSYSINI=/usr/local/odbc export CLOUDERAHIVEINI=/etc/cloudera.). If the configuration files already exist in the home directory.hiveodbc. and then rename the files. A file name beginning with a period (.ini The following search order is used to locate the cloudera.ini and odbcinst. then you can copy the sample configuration files to the home directory.ini l odbcinst. if your odbc.) so that they will appear in directory listings by default. then the driver searches for the file specified by the environment variable.ini file: 1.hiveodbc. The directory containing the driver’s binary is searched for a file named cloudera. The names of the sample configuration files do not begin with a period (. if the default location is used.ini (not beginning with a period). ODBCSYSINI. Cloudera ODBC Driver for Apache Hive | 29 . The following is an example of an odbc. The current working directory of the application is searched for a file named cloudera.so HOST=MyHiveServer PORT=10000 MyHiveServer is the IP address or host name of the Hive server.ini file.ini (not beginning with a period).ini File Note: If you are using a DSN-less connection. such as ODBC tracing.odbc. see "DSN-less Connections" on page 44.cloudera. then you do not need to configure the odbc.ini configuration file for Mac OS X: [ODBC Data Sources] Sample Cloudera Hive DSN=Cloudera Hive ODBC Driver [Sample Cloudera Hive DSN] Driver=/opt/cloudera/hiveodbc/lib/universal/libclouderahiveodbc. $HOME) is searched for a hidden file named . 4.hiveodbc. listing DSNs and associating DSNs with a driver.ini 5.hiveodbc. l A section having the same name as the data source specified in the [ODBC Data Sources] section is required to configure the data source.hiveodbc. l [ODBC Data Sources] is required. ODBC Data Source Names (DSNs) are defined in the odbc.ini configuration file. Open the . The following is an example of an odbc.ini (not beginning with a period). The directory ~/ (that is.dyl ib HOST=MyHiveServer PORT=10000 MyHiveServer is the IP address or host name of the Hive server.ini configuration file in a text editor. Configuring the odbc.Configuring ODBC Connections for Non-Windows Platforms 3. The directory /etc is searched for a file named cloudera. The file is divided into several sections: l [ODBC] is optional and used to control global ODBC configuration. For information about configuring a DSN-less connection. To create a Data Source Name: 1.ini configuration file for Linux/AIX/Debian: [ODBC Data Sources] Sample Cloudera Hive DSN 32=Cloudera Hive ODBC Driver 32-bit [Sample Cloudera Hive DSN 32] Driver=/opt/cloudera/hiveodbc/lib/32/libclouderahiveodbc32. 30 | Cloudera ODBC Driver for Apache Hive . so [Cloudera Hive ODBC Driver 64-bit] Description=Cloudera Hive ODBC Driver (64-bit) Driver=/opt/cloudera/hiveodbc/lib/64/libclouderahiveodbc64. as described in "Configuring the odbc. check the configuration of your Hadoop / Hive distribution. A section having the same name as the driver name specified in the [ODBC Drivers] section lists driver attributes and values.ini File" on page 30. add a new section with a name that matches the DSN you specified in step 2. see Appendix D "Driver Configuration Options" on page 52. and then the driver name.ini file is divided into the following sections: l l [ODBC Drivers] lists the names of all the installed ODBC drivers. Configuring the odbcinst. 4. Specify configuration options as key-value pairs.ini file. The odbcinst.so The following is an example of an odbcinst.ini configuration file. In the . For information about the configuration options available for controlling the behavior of DSNs that are using the Cloudera ODBC Driver for Apache Hive. and then add configuration options to the section. which you configure by setting the AuthMech key to 2. add a new entry by typing the Data Source Name (DSN). Save the .ini configuration file. Most default configurations of Hive Server 2 require User Name authentication. To verify the authentication mechanism that you need to use for your connection.ini configuration file.odbc. The following is an example of an odbcinst.ini File ODBC drivers are defined in the odbcinst. For more information. The configuration file is optional because drivers can be specified directly in the odbc.Configuring ODBC Connections for Non-Windows Platforms 2. In the [ODBC Data Sources] section. see "Authentication Options" on page 45.ini configuration file for Mac OS X: [ODBC Drivers] Cloudera Hive ODBC Driver=Installed Cloudera ODBC Driver for Apache Hive | 31 .odbc. then an equal sign (=).ini configuration file for Linux/AIX/Debian: [ODBC Drivers] Cloudera Hive ODBC Driver 32-bit=Installed Cloudera Hive ODBC Driver 64-bit=Installed [Cloudera Hive ODBC Driver 32-bit] Description=Cloudera Hive ODBC Driver (32-bit) Driver=/opt/cloudera/hiveodbc/lib/32/libclouderahiveodbc32. Note: Hive Server 1 does not support authentication. 3. Settings that you define in the cloudera. In the [ODBC Drivers] section. 32 | Cloudera ODBC Driver for Apache Hive .odbcinst.ini File The cloudera. the shared library name for iODBC is libiodbcinst. then set the value to UTF-16. OR If you are using AIX and the unixODBC driver manager. add a new section with a name that matches the driver name you typed in step 2.ini configuration file in a text editor. add a new entry by typing the driver name and then typing =Installed Note: Type a symbolic name that you want to use to refer to the driver in connection strings or DSNs. 3. To determine the correct library to specify.ini file. then set the value to UTF-16 for the 32-bit driver or UTF-32 for the 64-bit driver.hiveodbc. depending on the ODBC driver manager you use.hiveodbc. the shared library name for iODBC is libiodbcinst.dylib. In the . 2. Configuring the cloudera. To configure the Cloudera ODBC Driver for Apache Hive to work with your ODBC driver manager: 1. The value is the name of the ODBCInst shared library for the ODBC driver manager you use. refer to your ODBC driver manager documentation. Specify configuration options as key-value pairs. If you are using AIX and the iODBC driver manager.ini file apply to all connections that use the driver.so.ini configuration file in a text editor.ini configuration file. Edit the DriverManagerEncoding setting. refer to your ODBC driver manager documentation. To determine the correct setting to use. In Linux/AIX/Debian. 2.ini file contains configuration settings for the Cloudera ODBC Driver for Apache Hive. 4.odbcinst.odbcinst. The value is usually UTF-16 or UTF-32 if you are using Linux/Mac OS X.dyl ib To define a driver: 1. Edit the ODBCInstLib setting.hiveodbc.Configuring ODBC Connections for Non-Windows Platforms [Cloudera Hive ODBC Driver] Description=Cloudera Hive ODBC Driver Driver=/opt/cloudera/hiveodbc/lib/universal/libclouderahiveodbc. and unixODBC uses UTF-16. Open the cloudera. iODBC uses UTF32. Open the . 3.ini file provided in the Setup directory.hiveodbc. In Mac OS X. The configuration file defaults to the shared library for iODBC. and then add configuration options to the section based on the sample odbcinst. Save the . To enable service discovery via ZooKeeper: 1.Configuring ODBC Connections for Non-Windows Platforms Note: You can specify an absolute or relative filename for the library. In Mac OS X. you may need to provide different connection attributes or values in your connection string or DSN. type the following. For example. To connect to a Hive server. 4. 4.hiveodbc. Open the odbc. see "Configuring Logging Options" on page 36. Configuring Authentication Some Hive servers are configured to require authentication for access. In Linux/AIX/Debian. For more information. see "Driver Configuration Options" on page 52. see Appendix B "Authentication Options" on page 45. If you intend to use the relative filename. you must configure the Cloudera ODBC Driver for Apache Hive to use the authentication mechanism that matches the access requirements of the server and provides the necessary credentials.ini configuration file. For more information about connection attributes. configure logging by editing the LogLevel and LogPath settings.zk_host2:zk_port2 Important: When ServiceDiscoveryMode is set to 1. then the path to the library must be included in the library path environment variable. Depending on whether service discovery mode is enabled or disabled. 2. For information about how to determine the type of authentication your Hive server requires. Set the ZKNamespace connection attribute to specify the namespace on ZooKeeper under which Hive Server 2 znodes are added. connections to Hive Server 1 are not supported and the Port connection attribute is not applicable. Cloudera ODBC Driver for Apache Hive | 33 . Set the Host connection attribute to specify the ZooKeeper ensemble as a commaseparated list of ZooKeeper servers.ini configuration file in a text editor. Save the cloudera. Configuring Service Discovery Mode You can configure the Cloudera ODBC Driver for Apache Hive to discover Hive Server 2 services via ZooKeeper. Optionally. the library path environment variable is named DYLD_LIBRARY_PATH. 5. where zk_host is the IP address or host name of the ZooKeeper server and zk_port is the number of the port that the ZooKeeper server uses: zk_host1:zk_port1. the library path environment variable is named LD_LIBRARY_PATH. Set the ServiceDiscoveryMode connection attribute to 1 3. there may be additional connection attributes that you must define. Note: To use the Hive server host name as the fully qualified domain name for Kerberos authentication. the Binary transport protocol is not supported. Important: When using this authentication mechanism. For more information. To configure a connection without authentication: 1. set KrbHostFQDN to _HOST 4. Using Kerberos Kerberos must be installed and configured before you can use this authentication mechanism. When you use Kerberos authentication. If the Hive server is configured to use SSL. refer to the MIT Kerberos documentation. Set the KrbHostFQDN attribute to the fully qualified domain name of the Hive Server 2 host. When you use No Authentication. Depending on the authentication mechanism you use. 3. see Appendix D "Driver Configuration Options" on page 52. OR To use the default realm defined in your Kerberos setup. do not set the KrbRealm attribute. then configure SSL for the connection. Set the ThriftTransport connection attribute to the transport protocol to use in the Thrift layer. For more information. SASL is not supported. SASL (ThriftTransport=1) is not supported. 34 | Cloudera ODBC Driver for Apache Hive . Using No Authentication When connecting to a Hive server of type Hive Server 1. Set the AuthMech connection attribute to 1 2. see "Configuring SSL Verification" on page 35. To configure Kerberos authentication: 1.ini file). you must use No Authentication. then set the appropriate realm using the KrbRealm attribute. For more information about the attributes involved in configuring authentication. 5. This authentication mechanism is available only for Hive Server 2. Set the AuthMech connection attribute to 0 2. Set the KrbServiceName attribute to the service name of the Hive server.Configuring ODBC Connections for Non-Windows Platforms You can select the type of authentication to use for a connection by defining the AuthMech connection attribute in a connection string or in a DSN (in the odbc. Set the ThriftTransport connection attribute to the transport protocol to use in the Thrift layer. 3. If your Kerberos setup does not define a default realm or if the realm of your Hive server is not the default. Set the ThriftTransport connection attribute to 1 Using User Name and Password This authentication mechanism requires a user name and a password. Configuring SSL Verification You can configure verification between the client and the Hive server over SSL. see "Configuring SSL Verification" on page 35. set the SSL attribute to 1 Cloudera ODBC Driver for Apache Hive | 35 . Set the PWD attribute to the password corresponding to the user name you provided in step 2. For more information. then configure SSL for the connection. 2. Set the ThriftTransport connection attribute to the transport protocol to use in the Thrift layer. If the Hive server is configured to use SSL. then configure SSL for the connection. Binary (ThriftTransport=0) is not supported. When you use User Name authentication. facilitating database tracking. 5. 3. Set the UID attribute to an appropriate user name for accessing the Hive server. This authentication mechanism is available only for Hive Server 2. 4. The user name labels the session. To configure User Name and Password authentication: 1. Set the UID attribute to an appropriate user name for accessing the Hive server. To configure SSL verification: 1. To enable SSL. see "Configuring SSL Verification" on page 35. This authentication mechanism is available only for Hive Server 2. 3. 6. Set the AuthMech connection attribute to 2 2.Configuring ODBC Connections for Non-Windows Platforms Important: When using this authentication mechanism. For more information. Set the AuthMech connection attribute to 3 2. SSL is not supported and you must use SASL as the Thrift transport protocol. Open the odbc. To configure User Name authentication: 1. If the Hive server is configured to use SSL. Using User Name This authentication mechanism requires a user name but does not require a password. Most default configurations of Hive Server 2 require User Name authentication.ini configuration file in a text editor. 2 Logs error events that might still allow the driver to continue running. To allow the common name of a CA-issued SSL certificate to not match the host name of the Hive server. you can enable logging in the driver. set the ClientPrivateKeyPassword attribute to the password. 1 Logs very severe error events that will lead the driver to abort. c) If the private key file is protected with a password.ini configuration file. If you want to configure two-way SSL verification. set the TrustedCerts attribute to the full path of the PEM file. Logging decreases performance and can consume a large quantity of disk space. 6. 3 Logs potentially harmful situations. do not specify a value for the TrustedCerts attribute. Configuring Logging Options To help troubleshoot issues. Save the odbc. Table 2. b) Set the ClientPrivateKey attribute to the full path of the file containing the client's private key. 36 | Cloudera ODBC Driver for Apache Hive . set the TwoWaySSL attribute to 1 and then do the following: a) Set the ClientCert attribute to the full path of the PEM file containing the client's certificate. OR To use the trusted CA certificates PEM file that is installed with the driver.Configuring ODBC Connections for Non-Windows Platforms 3. Cloudera ODBC Driver for Apache Hive Logging Levels LogLevel Value Description 0 Disables all logging. To allow self-signed certificates from the server. Use the LogLevel key to set the amount of detail included in log files. in order from least verbose to most verbose. set the AllowSelfSignedServerCert attribute to 1. set the CAIssuedCertNamesMismatch attribute to 1. Table 2 lists the logging levels provided by the Cloudera ODBC Driver for Apache Hive. Important: Only enable logging long enough to capture an issue. 5. To configure the driver to load SSL certificates from a specific PEM file when verifying the server. 7. 4. ini configuration file in a text editor. 2. 2.ini configuration file. Set the LogLevel key to 0 3.ini configuration file in a text editor.ini configuration file.log at the location you specify using the LogPath key.Features LogLevel Value Description 4 Logs general information that describes the progress of the driver. 5 Logs detailed information that is useful for debugging the driver. Open the cloudera.hiveodbc. Save the cloudera. Set the LogLevel key to the desired level of information to include in log files. Features More information is provided on the following features of the Cloudera ODBC Driver for Apache Hive: l "SQL Query versus HiveQL Query" on page 38 l "SQL Connector" on page 38 l "Data Types" on page 38 l "Catalog and Schema Support" on page 39 l "hive_system Table" on page 40 l "Server-Side Properties" on page 40 l "Get Tables With Query" on page 42 l "Active Directory" on page 42 Cloudera ODBC Driver for Apache Hive | 37 . Save the cloudera. For example: LogPath=/localhome/employee/Documents 4. 6 Logs more detailed information than LogLevel=5 To enable logging: 1. Restart your ODBC application to ensure that the new settings take effect. To disable logging: 1. The Cloudera ODBC Driver for Apache Hive produces a log file named HiveODBC_driver. 5.hiveodbc.hiveodbc. For example: LogLevel=2 3. Set the LogPath key to the full path to the folder where you want to save log files.hiveodbc. Open the cloudera. Supported Data Types Hive Type SQL Type TINYINT SQL_TINYINT SMALLINT SQL_SMALLINT INT SQL_INTEGER BIGINT SQL_BIGINT FLOAT SQL_REAL 38 | Cloudera ODBC Driver for Apache Hive . HiveQL is a subset of SQL-92. some applications still generate double-quoted identifiers. SQL Connector To bridge the difference between SQL and HiveQL. JOIN. The SQL Connector needs to handle this translation because even when a driver reports the back quote as the quote character. converting between Hive data types and SQL data types. For simple queries. For example: l l l l Quoted Identifiers — The double quotes (") that SQL uses to quote identifiers are translated into back quotes (`) to match HiveQL syntax. the syntax is different enough that most applications do not work with native HiveQL. the SQL Connector feature translates standard SQL-92 queries into equivalent HiveQL queries. The SQL Connector performs syntactical translations and structural transformations. Table 3. INNER JOIN. TOP N/LIMIT — SQL TOP N queries are transformed to HiveQL LIMIT queries. Data Types The Cloudera ODBC Driver for Apache Hive supports many common data formats. Table 3 lists the supported data type mappings. and CROSS JOIN syntax is translated to HiveQL JOIN syntax. which HiveQL normally does not support. INNER JOIN. and CROSS JOIN — SQL JOIN.Features l "Write-back" on page 42 l "Dynamic Service Discovery using ZooKeeper" on page 42 SQL Query versus HiveQL Query The native query language supported by Hive is HiveQL. However. Table Aliases — Support is provided for the AS keyword between a table reference and its alias. Interval types are not supported as column data types in tables. the driver provides a synthetic catalog called “HIVE” under which all of the Cloudera ODBC Driver for Apache Hive | 39 . MAP. BINARY SQL_VARBINARY Note: The aggregate types (ARRAY. Catalog and Schema Support The Cloudera ODBC Driver for Apache Hive supports both catalogs and schemas in order to make it easy for the driver to work with various ODBC applications. Columns of aggregate types are treated as STRING columns. TIMESTAMP SQL_TYPE_TIMESTAMP VARCHAR(n) SQL_VARCHAR DATE SQL_TYPE_DATE DECIMAL(p. The interval types (YEAR TO MONTH and DAY TIME) are supported only in query expressions and predicates. Since Hive only organizes tables into schemas/databases.Features Hive Type SQL Type DOUBLE SQL_DOUBLE DECIMAL SQL_DECIMAL BOOLEAN SQL_BIT STRING SQL_VARCHAR Note: SQL_WVARCHAR is returned instead if the Unicode SQL Character Types configuration option (the UseUnicodeSqlCharacterTypes key) is enabled. and STRUCT) are not yet supported.s) SQL_DECIMAL CHAR(n) SQL_CHAR Note: SQL_WCHAR is returned instead if the Unicode SQL Character Types configuration option (the UseUnicodeSqlCharacterTypes key) is enabled. Some versions of Hive do not support this query. <column definition>]* 40 | Cloudera ODBC Driver for Apache Hive . To do this. or set the appropriate configuration options in your connection string or the cloudera.Features schemas/databases are organized.ini file. see "Driver Configuration Options" on page 52. CREATE TABLE Statement for Temporary Tables The driver supports the following DDL syntax for creating temporary tables: <create table statement> := CREATE TABLE <temporary table name> <left paren><column definition list><right paren> <column definition list> := <column definition>[. The table has two STRING type columns.hive_system WHERE envkey LIKE '%hive%' The above query returns all of the Hive system environment entries whose key contains the word “hive. For versions of Hive that do not support querying system environment information. the driver returns an empty result set. envkey and envvalue. Temporary tables are only accessible by the ODBC connection that created them and they will be dropped upon disconnect. see "Configuring Server-Side Properties" on page 15. The pseudo-table is under the pseudo-schema called hive_system.ini file apply to all connections that use the Cloudera ODBC Driver for Apache Hive. Temporary Table The Temporary Table feature adds support for creating temporary tables and inserting literal values into temporary tables. use the Cloudera Hive ODBC Driver Configuration tool that is installed with the Windows version of the driver. For information about setting server-side properties when using the driver on a non-Windows platform. Server-side properties specified in a DSN affect only the connection that is established using the DSN. The driver also maps the ODBC schema to the Hive schema/database. set -v. For example: SELECT * FROM HIVE. Standard SQL can be executed against the hive_ system table. is executed to fetch system environment information.” A special query.hiveodbc.hiveodbc. For more information about setting server-side properties when using the Windows driver. Server-Side Properties The Cloudera ODBC Driver for Apache Hive allows you to set server-side properties via a DSN. You can also specify server-side properties for connections that do not use a DSN. hive_system Table A pseudo-table called hive_system can be used to query for Hive cluster system environment information.hive_system. Properties specified in the driver configuration tool or the cloudera. Cn DATATYPE_n) The temporary table name in a SQL query must be surrounded by double quotes ("). and VAL(Cn) is the literal value for the nth column in the table. C2 DATATYPE_2. VAL(C2) … VAL(Cn) ) VAL(C1) is the literal value for the first column in the table. Note: You can only use data types that are supported by Hive. Cloudera ODBC Driver for Apache Hive | 41 . INSERT Statement for Temporary Tables The driver supports the following DDL syntax for inserting data into temporary tables: <insert statement> := INSERT INTO <temporary table name> <left paren><column name list><right paren> VALUES <left paren><literal value list><right paren> <column name list> := <column name>[. <column name>]* <literal value list> := <literal value>[. <literal value>]* <temporary table name> := <double quote><number sign><table name><double quote> <left paren> := ( <right paren> := ) <double quote> := " <number sign> := # The following is an example of a SQL statement for inserting data into temporary tables: INSERT INTO "#TEMPTABLE1" values (VAL(C1). and the name must begin with a number sign (#).Features <column definition> := <column name> <data type> <temporary table name> := <double quote><number sign><table name><double quote> <left paren> := ( <right paren> := ) <double quote> := " <number sign> := # The following is an example of a SQL statement for creating a temporary table: CREATE TABLE "#TEMPTABLE1" (C1 DATATYPE_1. Note: The INSERT statement is only supported for temporary tables. …. according to Cloudera's documentation. see "Configuring Service Discovery Mode" on page 33. and feature requests with us. For information about configuring this feature when using the driver on a non-Windows platform.14 or later. 42 | Cloudera ODBC Driver for Apache Hive . and DELETE syntax when connecting to a Hive Server 2 instance that is running Hive 0. When the number of tables in a database is above the limit. so that users in the Active Directory realm can access services in the MIT Kerberos Hadoop realm. As a workaround for this issue. In addition to providing user to user support. If you are a Subscription customer you may also use the Cloudera Support Portal to search the Knowledge Base or file a Case. comments. Active Directory The Cloudera ODBC Driver for Apache Hive supports Active Directory Kerberos on Windows. the API call will return a stack overflow error or a timeout error. The exact limit and the error that appears depends on the JVM settings.Contact Us Get Tables With Query The Get Tables With Query configuration option allows you to choose whether to use the SHOW TABLES query or the GetTables API call to retrieve table names from a database. our forums are a great place to share your questions. Write-back The Cloudera ODBC Driver for Apache Hive supports translation for INSERT. Contact Us If you are having difficulties using the driver. enable the Get Tables with Query configuration option (or GetTablesWithQuery key) to use the query instead of the API call. There are two prerequisites for using Active Directory Kerberos on Windows: l l MIT Kerberos is not installed on the client Windows machine. For information about configuring this feature in the Windows driver. see "Creating a Data Source Name" on page 7 or "Configuring a DSN-less Connection" on page 9. The MIT Kerberos Hadoop realm has been configured to trust the Active Directory realm. Hive Server 2 has a limit on the number of tables that can be in a database when handling the GetTables API call. our Community Forum may have your solution. Dynamic Service Discovery using ZooKeeper The Cloudera ODBC Driver for Apache Hive can be configured to discover Hive Server 2 services via the ZooKeeper service. UPDATE. prior to contacting Cloudera Support please prepare a detailed summary of the client and server environment including operating system version. and configuration.Contact Us Important: To help us assist you. patch level. Cloudera ODBC Driver for Apache Hive | 43 . separating each pair with a semicolon (.ini file or the absolute path of the shared object file for the driver. see "Configuring the odbcinst. For information about the connection attributes that are available. see "Driver Configuration Options" on page 52. Schema=DefaultSchema.HiveServerType=ServerType The placeholders in the connection string are defined as follows: l DriverNameOrFile is either the symbolic name of the installed driver defined in the odbcinst.ini File" on page 31. For information about the connection attributes that are available. l l DefaultSchema is the database schema to use when a schema is not explicitly specified in a query. see "Driver Configuration Options" on page 52. Add key-value pairs to the connection string as needed.HOST=MyHiveServer. Add key-value pairs to the connection string as needed. ServerType is either 1 (for Hive Server 1) or 2 (for Hive Server 2).ini file is configured to point to the symbolic name to the shared object file. If you use the symbolic name. and Value is the value for the attribute. l MyHiveServer is the IP address or host name of the Hive server. For more information. then you must ensure that the odbcinst. DSN Connections The following is an example of a connection string for a connection that uses a DSN: DSN=DataSourceName.PORT=PortNumber. you may need to use a connection string to connect to your data source. Key is any connection attribute that is not already specified as a configuration key in the DSN.).Appendix A Using a Connection String Appendix A Using a Connection String For some applications. The following is an example of a connection string for a DSN-less connection: Driver=DriverNameOrFile.). separating each pair with a semicolon (. 44 | Cloudera ODBC Driver for Apache Hive . DSN-less Connections Some client applications provide support for connecting to a data source using a driver without a DSN.Key=Value DataSourceName is the DSN that you are using for the connection. l PortNumber is the number of the port that the Hive server uses. authentication value in the hive-site. check the following three properties in the hive-site. Hive Server 1 instances do not support authentication. you must configure the Cloudera ODBC Driver for Apache Hive to use the authentication mechanism that matches the access requirements of the server and provides the necessary credentials. Hive Server 1 You must use No Authentication as the authentication mechanism. Authentication Mechanismto Use hive.authentication l hive. and SSL support.server2. check the server type and then refer to the corresponding section below.server2. To determine the authentication settings that your Hive server requires.mode l hive.use. the Thrift transport protocol.server2.SSL Use Table 4 to determine the authentication mechanism that you need to configure.server2.xml file: Table 4.Appendix B Authentication Options Appendix B Authentication Options To connect to a Hive server. Configuring authentication for a connection to a Hive Server 2 instance involves setting the authentication mechanism.server2.xml file in the Hive server that you are connecting to: l hive. To determine the settings that you need to use. Hive Server 2 Note: Most default configurations of Hive Server 2 require User Name authentication.transport.authentication Authentication Mechanism NOSASL No Authentication KERBEROS Kerberos NONE User Name LDAP User Name and Password Cloudera ODBC Driver for Apache Hive | 45 . based on the hive. authentication hive. If the value is true.transport.transport.SSL value in the hive-site. check the hive. 46 | Cloudera ODBC Driver for Apache Hive .xml file: Table 5.mode values in the hive-site. For detailed instructions on how to configure authentication when using a non-Windows driver.Appendix B Authentication Options Use Table 5 to determine the Thrift transport protocol that you need to configure. then you must disable SSL in your connection. based on the hive.server2.authentication and hive. Thrift Transport Protocol Setting to Use hive.server2.xml file.server2.server2.mode Thrift Transport Protocol NOSASL binary Binary KERBEROS binary or http SASL or HTTP NONE binary or http SASL or HTTP LDAP binary or http SASL or HTTP To determine whether SSL should be enabled or disabled for your connection. then you must enable and configure SSL in your connection.server2. see "Configuring Authentication" on page 11. For detailed instructions on how to configure authentication when using the Windows driver. If the value is false. see "Configuring Authentication" on page 33.use. 1i386.1: 1. click Finish Setting Up the Kerberos Configuration File Settings for Kerberos are specified through a configuration file. Normally.0. Follow the instructions in the installer to complete the installation process. MIT Kerberos Downloading and Installing MIT  Kerberos for Windows 4.0. 4.mit. use the following download link from the MIT Kerberos website: http://web.1amd64.0. Cloudera ODBC Driver for Apache Hive | 47 .INI file in the default location—the C:\ProgramData\MIT\Kerberos5 directory— or as a .edu/kerberos/dist/kfw/4.mit.0. The MIT Kerberos Hadoop realm has been configured to trust the Active Directory realm so that users in the Active Directory realm can access services in the MIT Kerberos Hadoop realm.msi Note: The 64-bit installer includes both 32-bit and 64-bit libraries. There are two prerequisites for using Active Directory Kerberos on Windows: l l MIT Kerberos is not installed on the client Windows machine. see the MIT Kerberos website at http://web.msi file that you downloaded in step 1. You can set up the configuration file as a .edu/kerberos/dist/kfw/4.msi OR To download the Kerberos installer for 32-bit computers. 3. use the following download link from the MIT Kerberos website: http://web.edu/kerberos/ To download and install MIT Kerberos for Windows 4.mit. To run the installer. refer to Microsoft Windows documentation. double-click the .0/kfw-4. the C:\ProgramData\MIT\Kerberos5 directory is hidden. When the installation completes.Appendix C Configuring Kerberos Authentication for Windows Appendix C Configuring Kerberos Authentication for Windows Active Directory The Cloudera ODBC Driver for Apache Hive supports Active Directory Kerberos on Windows. The 32-bit installer includes 32-bit libraries only.1 For information about Kerberos and download links for the installer.CONF file in a custom location. For information about viewing and using this hidden directory.0/kfw-4. 2. To download the Kerberos installer for 64-bit computers. type the absolute path to the krb5. under the System variables list. OR Obtain the configuration file from the /etc/krb5. Copy the krb5. type KRB5_CONFIG 8. Obtain a krb5. In the Variable value field. If you are using Windows 8 or later. Place the krb5. 10. To set up the Kerberos configuration file in a custom location: 1. 3. Setting Up the Kerberos Credential Cache File Kerberos uses a credential cache to store and manage credentials.conf folder on the computer that is hosting the Hive Server 2 instance.conf configuration file from your Kerberos administrator.conf to krb5. click the Advanced tab and then click Environment Variables 6. Click OK to save the new variable. 11. In the System Properties dialog box. 2. in the Variable name field. In the Environment Variables dialog box.Appendix C Configuring Kerberos Authentication for Windows Note: For more information on configuring Kerberos. right-click This PC on the Start screen. click the Start button and then click Properties OR . Obtain a krb5. then right-click Computer. and then click OK to close the System Properties dialog box. click New 7. 2. Ensure that the variable is listed in the System variables list.conf configuration file from your Kerberos administrator. and then click Properties 4. 48 | Cloudera ODBC Driver for Apache Hive .conf folder on the computer that is hosting the Hive Server 2 instance. 9. Click OK to close the Environment Variables dialog box. In the New System Variable dialog box. refer to the MIT Kerberos documentation. Rename the configuration file from krb5.ini 3.conf file in an accessible directory and make note of the full path name.ini file to the C:\ProgramData\MIT\Kerberos5 directory and overwrite the empty sample file.conf file from step 2. OR Obtain the configuration file from the /etc/krb5. If you are using Windows 7 or earlier. Click Advanced System Settings 5. To set up the Kerberos configuration file in the default location: 1. and then click the Kerberos for Windows (64-bit) or Kerberos for Windows (32-bit) program group. click the Start button . under the System variables list. create a directory named C:\temp 2. click the Advanced tab and then click Environment Variables 5. To ensure that Kerberos uses the new settings. Click Advanced System Settings 4. Obtaining a Ticket for a Kerberos Principal A principal refers to a user or service that can authenticate to Kerberos. 9. type KRB5CCNAME 7. then right-click Computer. In the New System Variable dialog box. click the Start button and then click Properties OR . and then click Properties 3. 11. click New 6.Appendix C Configuring Kerberos Authentication for Windows To set up the Kerberos credential cache file: 1. If you are using Windows 8 or later. right-click This PC on the Start screen. For example. and then click OK to close the System Properties dialog box. and then append the file name krb5cache. Click OK to save the new variable. Click OK to close the Environment Variables dialog box. For example. in the Variable name field. If you are using Windows 7 or earlier. In the System Properties dialog box. or use the default keytab file of your Kerberos configuration. You can specify a keytab file to use. To obtain a ticket for a Kerberos principal using a password: 1. In the Variable value field. a principal must obtain a ticket by using a password or a keytab file. If you receive a permission error when you first use Kerberos. Create a directory where you want to save the Kerberos credential cache file. then click All Programs. if you created the folder C:\temp in step 1. and it should not be created by the user. To authenticate to Kerberos. ensure that the krb5cache file does not already exist as a file or a directory. In the Environment Variables dialog box. OR Cloudera ODBC Driver for Apache Hive | 49 . If you are using Windows 7 or earlier. 10. type the path to the folder you created in step 1. Ensure that the variable appears in the System variables list. then type C:\temp\krb5cache Note: krb5cache is a file (not a directory) that is managed by the Kerberos software. 8. restart your computer. In the command. For example: kinit -k -t C:\mykeytabs\myUser. To obtain a ticket for a Kerberos principal using a keytab file: 1. type a command using the following syntax: kinit -k -t keytab_path principal keytab_path is the full path to the keytab file. and then click OK If the authentication succeeds. click the arrow button at the bottom of the Start screen. In the Command Prompt. click Get Ticket 4. If the cache location KRB5CCNAME is not set or used. In the Get Ticket dialog box. click the arrow button at the bottom of the Start screen.keytab myUser@EXAMPLE. For example: C:\mykeytabs\myUser. then click All Programs. and then click 2. Click MIT Kerberos Ticket Manager 3. refer to the MIT Kerberos documentation. the -c argument must appear last. 2. In the Command Prompt. If you are using Windows 7 or earlier. If you are using Windows 8 or later. and then click Command Prompt 2. 1. type a command using the following syntax: kinit -k principal principal is the Kerberos user principal to use for authentication. In the MIT Kerberos Ticket Manager.Appendix C Configuring Kerberos Authentication for Windows If you are using Windows 8 or later. then use the -c option of the kinit command to specify the location of the credential cache. and then click Command Prompt OR . Click the Start button Command Prompt .keytab principal is the Kerberos user principal to use for authentication. For example: myUser@EXAMPLE. then find the Windows System program group. type your principal name and password.COM 3. To obtain a ticket for a Kerberos principal using the default keytab file: Note: For information about configuring a default keytab file for your Kerberos configuration. and then find the Kerberos for Windows (64-bit) or Kerberos for Windows (32-bit) program group. For example: myUser@EXAMPLE. not a directory.COM 50 | Cloudera ODBC Driver for Apache Hive .COM -c C:\ProgramData\MIT\krbcache Krbcache is the Kerberos cache file. then click All Programs. click the Start button then click Accessories. then your ticket information appears in the MIT Kerberos Ticket Manager. then click Accessories. COM -c C:\ProgramData\MIT\krbcache Krbcache is the Kerberos cache file. For example: kinit -k -t C:\mykeytabs\myUser. then use the -c option of the kinit command to specify the location of the credential cache. Cloudera ODBC Driver for Apache Hive | 51 .keytab myUser@EXAMPLE. If the cache location KRB5CCNAME is not set or used. In the command.Appendix C Configuring Kerberos Authentication for Windows 3. the -c argument must appear last. not a directory. ini file apply to all connections. whereas configuration options passed in in the connection string or set in an odbc.ini files.hiveodbc.Appendix D Driver Configuration Options Appendix D Driver Configuration Options Appendix D "Driver Configuration Options" on page 52 lists the configuration options available in the Cloudera ODBC Driver for Apache Hive alphabetically by field or button label.ini file are specific to a connection. Configuration options passed in using the connection string take precedence over configuration options set in odbc. Note: You can pass in configuration options in your connection string or set them in your odbc. the fields and buttons are available in the Cloudera Hive ODBC Driver Configuration tool and the following dialog boxes: l Cloudera ODBC Driver for Apache Hive DSN Setup l HTTP Properties l SSL Options l Advanced Options l Server Side Properties When using a connection string or configuring a connection from a Linux/Mac OS X/AIX/Debian computer.ini and cloudera.ini Configuration Options Appearing in the User Interface The following configuration options are accessible via the Windows user interface for the Cloudera ODBC Driver for Apache Hive.ini take precedence over configuration options set in cloudera. Configuration options set in odbc. When creating or configuring a connection from a Windows computer.hiveodbc. or via the key name when using a connection string or configuring a connection from a Linux/Mac OS X/AIX/Debian computer: l l l "Allow Common Name Host Name Mismatch" on page 53 "Allow Self-signed Server Certificate" on page 53 "Apply Properties with Queries" on page 54 l "Host FQDN" on page 60 l "HTTP Path" on page 60 l "Mechanism" on page 61 l "Password" on page 61 l "Port" on page 62 l "Binary Column Length" on page 54 l "Realm" on page 62 l "Client Certificate File" on page 55 l "Rows Fetched Per Block" on page 62 l "Client Private Key File" on page 55 l l "Client Private Key Password" on page 55 52 | Cloudera ODBC Driver for Apache Hive l "Save Password (Encrypted)" on page 62 "Service Discovery Mode" on page 63 . Options having only key names—not appearing in the user interface of the driver—are listed alphabetically by key name. Configuration options set in a cloudera.ini. use the key names provided.hiveodbc. the CA-issued SSL certificate name must match the host name of the Hive server. the driver allows a CA-issued SSL certificate name to not match the host name of the Hive server. Note: This setting is applicable only when SSL is enabled. Allow Self-signed Server Certificate Key Name Default Value Required AllowSelfSignedServerCert Clear (0) No Cloudera ODBC Driver for Apache Hive | 53 . When this option is disabled (0).Appendix D Driver Configuration Options l "Convert Key Name to Lower Case" on page 56 l "Data File HDFS Dir" on page 56 l "Database" on page 56 l "Decimal Column Scale" on page 57 l l l "Default String Column Length" on page 57 "Delegation UID" on page 57 l "Service Name" on page 63 l "Show System Table" on page 63 l "Socket Timeout" on page 64 l "Temp Table TTL" on page 64 l "Thrift Transport" on page 64 l "Trusted Certificates" on page 65 l "Two Way SSL" on page 65 l "Driver Config Take Precedence" on page 57 l "Enable SSL" on page 58 l "Enable Temporary Table" on page 58 l "Fast SQLPrepare" on page 58 l "Get Tables With Query" on page 59 l "HDFS User" on page 59 l "Hive Server Type" on page 59 l "Host(s)" on page 60 "Unicode SQL Character Types" on page 66 l "Use Async Exec" on page 66 l "Use Native Query" on page 67 l "Use Only SSPI Plugin" on page 67 l "User Name" on page 68 l "Web HDFS Host" on page 68 l "Web HDFS Port" on page 68 l "ZooKeeper Namespace" on page 68 Allow Common Name Host Name Mismatch Key Name Default Value Required CAIssuedCertNamesMismatch Clear (0) No Description When this option is enabled (1). By default. 54 | Cloudera ODBC Driver for Apache Hive . the driver does not allow self-signed certificates from the server. However. When this option is disabled (0). the driver uses a more efficient method for applying server-side properties that does not involve additional network round-tripping. the driver authenticates the Hive server even if the server is using a self-signed certificate. ApplySSPWithQueries is always enabled. some Hive Server 2 builds are not compatible with the more efficient method. Note: This setting is applicable only when SSL is enabled. When this option is disabled (0). Apply Properties with Queries Key Name Default Value Required ApplySSPWithQueries Selected (1) No Description When this option is enabled (1). the driver applies each server-side property by executing a set SSPKey=SSPValue query when opening a session to the Hive server. Binary Column Length Key Name Default Value Required BinaryColumnLength 32767 No Description The maximum data length for BINARY columns. the columns metadata for Hive does not specify a maximum data length for BINARY columns. Note: When connecting to a Hive Server 1 instance.Appendix D Driver Configuration Options Description When this option is enabled (1). If the private key file is protected with a password. if two-way SSL verification is enabled. if two-way SSL verification is enabled. Description The full path to the PEM file containing the client's SSL private key. if two-way SSL verification is enabled and the client's private key file is protected with a password. Client Private Key Password Key Name Default Value ClientPrivateKeyPassword None Required Yes.Appendix D Driver Configuration Options Client Certificate File Key Name Default Value ClientCert None Required Yes. Cloudera ODBC Driver for Apache Hive | 55 . Description The password of the private key file that is specified in the Client Private Key File field (the ClientPrivateKey key). Note: This setting is applicable only when two-say SSL is enabled. Client Private Key File Key Name Default Value ClientPrivateKey None Required Yes. then provide the password using the driver configuration option "Client Private Key Password" on page 55. Note: This setting is applicable only when two-say SSL is enabled. Description The full path to the PEM file containing the client's SSL certificate. the driver converts server-side property key names to all lower case characters.0.org/jira/browse/HIVE-4554). You can still issue queries on other schemas by explicitly specifying the schema in the query. Note: To inspect your databases and determine the appropriate schema to use.Appendix D Driver Configuration Options Convert Key Name to Lower Case Key Name Default Value Required LCaseSspKeyName Selected (1) No Description When this option is enabled (1). 56 | Cloudera ODBC Driver for Apache Hive . HDFS paths with space characters do not work with versions of Hive prior to 0. Database Key Name Default Value Required Schema default No Description The name of the database schema to use when a schema is not explicitly specified in a query.14 or later.apache. Note: Due to a problem in Hive (see https://issues. type the show databases command at the Hive command prompt. the driver does not modify the server-side property key names. This option is not applicable when connecting to Hive 0. When this option is disabled (0). Data File HDFS  Dir Key Name Default Value Required HDFSTempTableDir /tmp/simba No Description The HDFS directory that the driver will use to store the necessary files for supporting the Temporary Table feature.12. Delegation UID Key Name Default Value Required DelegationUID None No Description Use this option to delegate all operations against Hive to a user that is different than the authenticated user for the connection. By default. the columns metadata for Hive does not specify a maximum data length for STRING columns. Note: This option is applicable only when connecting to a Hive Server 2 instance that supports this feature. Driver Config Take Precedence Key Name Default Value Required DriverConfigTakePrecedence Clear (0) No Cloudera ODBC Driver for Apache Hive | 57 .Appendix D Driver Configuration Options Decimal Column Scale Key Name Default Value Required DecimalColumnScale 10 No Description The maximum number of digits to the right of the decimal point for numeric data types. Default String Column Length Key Name Default Value Required DefaultStringColumnLength 255 No Description The maximum data length for STRING columns. Important: When connecting to Hive 0. When this option is disabled (0). the driver supports the creation and use of temporary tables. Enable SSL Key Name Default Value Required SSL Clear (0) No Description When this option is set to (1). When this option is set to (0). Enable Temporary Table Key Name Default Value Required EnableTempTable Clear (0) No Description When this option is enabled (1).14 or later. the Temporary Tables feature is always enabled and you do not need to configure it in the driver. the driver does not support temporary tables.Appendix D Driver Configuration Options Description When this option is enabled (1). Note: This option is applicable only when connecting to a Hive server that supports SSL. connection and DSN settings take precedence instead. the client verifies the Hive server using SSL. SSL is disabled. driver-wide configurations take precedence over connection and DSN settings. When this option is disabled (0). Fast SQLPrepare Key Name Default Value Required FastSQLPrepare Clear (0) No 58 | Cloudera ODBC Driver for Apache Hive . HDFS  User Key Name Default Value Required HDFSUser hdfs No Description The name of the HDFS user that the driver will use to create the necessary files for supporting the Temporary Tables feature. the driver defers query execution to SQLExecute.14 or later. This option is not applicable when connecting to Hive 0. the driver does not defer query execution to SQLExecute.Appendix D Driver Configuration Options Description When this option is enabled (1). Get Tables With Query Key Name Default Value Required GetTablesWithQuery Clear (0) No Description When this option is enabled (1). When this option is disabled (0). If the result set metadata is not required after calling SQLPrepare. Hive Server Type Key Name Default Value Required HiveServerType Hive Server 2 (2) No Cloudera ODBC Driver for Apache Hive | 59 . SQLPrepare might be slow. the driver will execute the HiveQL query to retrieve the result set metadata for SQLPrepare. the driver uses the SHOW TABLES query to retrieve the names of the tables in a database. the driver uses the GetTables Thrift API call to retrieve the names of the tables in a database. As a result. then enable Fast SQLPrepare. When using Native Query mode. When this option is disabled (0). Note: This option is applicable only when connecting to a Hive Server 2 instance. 60 | Cloudera ODBC Driver for Apache Hive . if the authentication mechanism is Kerberos. You can set the value of Host FQDN to _HOST in order to use the Hive server host name as the fully qualified domain name for Kerberos authentication. Select Hive Server 2 or set the key to 2 if you are connecting to a Hive Server 2 instance. Note: If Service Discovery Mode is enabled. Host(s) Key Name Default Value Required HOST None Yes Description If Service Discovery Mode is disabled. If Service Discovery Mode is enabled. HTTP  Path Key Name Default Value Required HTTPPath None Yes. specify a comma-separated list of ZooKeeper servers in the following format.Appendix D Driver Configuration Options Description Select Hive Server 1 or set the key to 1 if you are connecting to a Hive Server 1 instance.zk_host2:zk_port2 Host FQDN Key Name Default Value KrbHostFQDN None Required Yes. If Service Discovery Mode is disabled. then connections to Hive Server 1 are not supported. if you are using HTTP as the Thrift transport protocol. then the driver uses the value specified in the Host connection attribute. then the driver uses the Hive Server 2 host name returned by ZooKeeper. If Service Discovery Mode is enabled. specify the IP address or host name of the Hive server. Description The fully qualified domain name of the Hive Server 2 host. where zk_host is the IP address or host name of the ZooKeeper server and zk_ port is the number of the port that the ZooKeeper server uses: zk_host1:zk_port1. Description The authentication mechanism to use. see "Thrift Transport" on page 64. Note: This option is applicable only when you are using HTTP as the Thrift transport protocol. For more information. No User Name (2) if you are connecting to Hive Server 2. or set the key to the corresponding number: l No Authentication (0) l Kerberos (1) l User Name (2) l User Name and Password (3) Password Key Name Default Value PWD None Required Yes. Select one of the following settings. Description The password corresponding to the user name that you provided in the User Name field (the UID key). Mechanism Key Name AuthMech Default Value Required No Authentication (0) if you are connecting to Hive Server 1. if the authentication mechanism is User Name and Password. Cloudera ODBC Driver for Apache Hive | 61 .Appendix D Driver Configuration Options Description The partial URL corresponding to the Hive server. Description The number of the TCP port that the Hive server uses to listen for client connections.Appendix D Driver Configuration Options Port Key Name Default Value PORT 10000 Required Yes. Rows Fetched Per Block Key Name Default Value Required RowsFetchedPerBlock 10000 No Description The maximum number of rows that a query returns at a time. If your Kerberos configuration already defines the realm of the Hive Server 2 host as the default realm. Required No Description The realm of the Hive Server 2 host. then you do not need to configure this option. 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. if Service Discovery Mode is disabled. Realm Key Name KrbRealm Default Value Depends on your Kerberos configuration. Save Password (Encrypted) Key Name Default Value Required N/A Clear (0) No 62 | Cloudera ODBC Driver for Apache Hive . Important: The password will be obscured (not saved in plain text). Show System Table Key Name Default Value Required ShowSystemTable Clear (0) No Cloudera ODBC Driver for Apache Hive | 63 . it is still possible for the encrypted password to be copied and used. When this option is disabled (0). When this option is disabled (0). if the authentication mechanism is Kerberos. It appears in the Cloudera ODBC Driver for Apache Hive DSN Setup dialog box and the SSL Options dialog box.Appendix D Driver Configuration Options Description This option is available only in the Windows driver. When this option is enabled (1). the driver connects to Hive without using the ZooKeeper service. Description The Kerberos service principal name of the Hive server. Service Name Key Name Default Value KrbServiceName None Required Yes. the specified password is saved in the registry. the specified password is not saved in the registry. the driver discovers Hive Server 2 services via the ZooKeeper service. Service Discovery Mode Key Name Default Value Required ServiceDiscoveryMode No Service Discovery (0) No Description When this option is enabled (1). However. This option is not applicable when connecting to Hive 0.Appendix D Driver Configuration Options Description When this option is enabled (1). No SASL (1) if you are connecting to Hive Server 2. Temp  Table TTL Key Name Default Value Required TempTableTTL 10 No Description The number of minutes a temporary table is guaranteed to exist in Hive after it is created.14 or later. the driver returns the hive_system table for catalog function calls such as SQLTables and SQLColumns When this option is disabled (0). Thrift Transport Key Name Default Value Required ThriftTransport Binary (0) if you are connecting to Hive Server 1. 64 | Cloudera ODBC Driver for Apache Hive . Socket Timeout Key Name Default Value Required SocketTimeout 30 No Description The number of seconds that an operation can remain idle before it is closed. Note: This option is applicable only when asynchronous query execution is being used against Hive Server 2 instances. the driver does not return the hive_system table for catalog function calls. If this option is not set. Description The location of the PEM file containing trusted CA certificates for authenticating the Hive server when using SSL. Two Way SSL Key Name Default Value Required TwoWaySSL Clear (0) No Cloudera ODBC Driver for Apache Hive | 65 .pem file in the lib folder or subfolder within the driver's installation directory. Note: This setting is applicable only when SSL is enabled. then the driver will default to using the trusted CA certificates PEM file installed by the driver. Select one of the following settings.Appendix D Driver Configuration Options Description The transport protocol to use in the Thrift layer. No The exact file path varies depending on the version of the driver that is installed. For example. or set the key to the corresponding number: l Binary (0) l SASL (1) l HTTP (2) Trusted Certificates Key Name Default Value Required TrustedCerts The cacerts. the path for the Windows driver is different from the path for the Mac OS X driver. the driver returns SQL_VARCHAR for STRING and VARCHAR columns. see "Enable SSL" on page 58. and returns SQL_WCHAR for CHAR columns. Depending on whether one-way SSL is enabled. For more information.apache. When this option is disabled (0). turn off asynchronous query execution and execute the query again. the driver uses an asynchronous version of the API call against Hive for executing a query.Appendix D Driver Configuration Options Description When this option is enabled (1). then the server does not verify the client. and returns SQL_CHAR for CHAR columns. To see the actual error message relevant to the problem. You must enable SSL before Two Way SSL can be configured. see "Enable SSL" on page 58. the driver returns SQL_WVARCHAR for STRING and VARCHAR columns. "Client Private Key File" on page 55. Hive returns generic error messages for errors that occur during query execution.12. 66 | Cloudera ODBC Driver for Apache Hive . the client and the Hive server verify each other using SSL. When this option is disabled (0). Unicode SQL Character Types Key Name Default Value Required UseUnicodeSqlCharacterTypes Clear (0) No Description When this option is enabled (1). and "Client Private Key Password" on page 55. For more information. Note: This option is applicable only when connecting to a Hive server that supports SSL. See also the driver configuration options "Client Certificate File" on page 55. the client may verify the server. Use Async Exec Key Name Default Value Required EnableAsyncExec Clear (0) No Description When this option is enabled (1). the driver executes queries synchronously.0 (see https://issues.org/jira/browse/HIVE-5230). When this option is disabled (0). Due to a problem in Hive 0. so the native query is used. the driver uses MIT Kerberos to handle Kerberos authentication. When this option is disabled (0). the driver transforms the queries emitted by an application and converts them into an equivalent from in HiveQL. Important: This option is available only in the Windows driver. the driver handles Kerberos authentication by using the SSPI plugin instead of MIT Kerberos by default. Use Only SSPI  Plugin Key Name Default Value Required UseOnlySSPI Clear (0) No Description When this option is enabled (1). Cloudera ODBC Driver for Apache Hive | 67 . Use Native Query Key Name Default Value Required UseNativeQuery Clear (0) No Description When this option is enabled (1).0 or higher. then enable this option to avoid the extra overhead of query transformation. Note: If the application is Hive-aware and already emits HiveQL.Appendix D Driver Configuration Options Note: This option only takes effect when connecting to a Hive cluster running Hive 0. and only uses the SSPI plugin if the gssapi library is not available.12. When this option is disabled (0). the driver does not transform the queries emitted by an application. if Service Discovery Mode is enabled. No Description The host name or IP address of the machine hosting both the namenode of your Hadoop cluster and the WebHDFS service. This option is not applicable when connecting to Hive 0. if the authentication mechanism is User Name. if the authentication mechanism is User Name and Password. . Web HDFS  Port Key Name Default Value Required WebHDFSPort 50070 No Description The WebHDFS port for the namenode. the default value is anonymous Required No.Appendix D Driver Configuration Options User Name Key Name Default Value UID For User Name authentication only.14 or later. Web HDFS  Host Key Name Default Value Required WebHDFSHost The Hive server host. ZooKeeper Namespace Key Name Default Value ZKNamespace None 68 | Cloudera ODBC Driver for Apache Hive Required Yes. Yes. This option is not applicable when connecting to Hive 0. Description The user name that you use to access Hive Server 2.14 or later. where HeaderKey is the name of the header to set and HeaderValue is the value to assign to the header: http.header.header." on page 69 l "SSP_" on page 70 Driver Default Value Required The default value varies depending on the version of the driver that is installed.header.Appendix D Driver Configuration Options Description The namespace on ZooKeeper under which Hive Server 2 znodes are added.AUTHENTICATED_USER=john After the driver applies the header. prefix is removed from the DSN entry. http. For example.header.HeaderKey=HeaderValue For example: http. the http. Configuration Options Having Only Key Names The following configuration options do not appear in the Windows user interface for the Cloudera ODBC Driver for Apache Hive and are only accessible when using a connection string or configuring a connection from a Linux/Mac OS X/AIX/Debian computer: l "Driver" on page 69 l "http.header. the value for the Windows driver is different from the value of the Mac OS X driver. Default Value Required None No Description Set a custom HTTP header by using the following syntax. Yes Description The name of the installed driver (Cloudera ODBC Driver for Apache Hive) or the absolute path of the Cloudera ODBC Driver for Apache Hive shared object file. leaving an entry of HeaderKey=HeaderValue Cloudera ODBC Driver for Apache Hive | 69 . names=myQueue After the driver applies the server-side property. This option is applicable only when you are using HTTP as the Thrift transport protocol. see "Thrift Transport" on page 64. leaving an entry of SSPKey=SSPValue Note: The SSP_ prefix must be upper case.header. For more information. SSP_ Default Value Required None No Description Set a server-side property by using the following syntax. where SSPKey is the name of the serverside property to set and SSPValue is the value to assign to the server-side property: SSP_SSPKey=SSPValue For example: SSP_mapred. the SSP_ prefix is removed from the DSN entry.queue. prefix is case-sensitive. 70 | Cloudera ODBC Driver for Apache Hive .Appendix D Driver Configuration Options The example above would create the following custom HTTP header: AUTHENTICATED_USER: john Note: The http. ODBC compliance levels are Core. For more information. and Level 2.com/en-us/library/ms716246%28VS.Appendix E ODBC API Conformance Level Appendix E ODBC API Conformance Level Table 6 lists the ODBC interfaces that the Cloudera ODBC Driver for Apache Hive implements and the ODBC compliance level of each interface.85%29. These compliance levels are defined in the ODBC Specification published with the Interface SDK from Microsoft. see http://msdn. ODBC API Conformance Level Conformance Level INTERFACES Conformance Level INTERFACES Core SQLAllocHandle Core SQLGetStmtAttr Core SQLBindCol Core SQLGetTypeInfo Core SQLBindParameter Core SQLNativeSql Core SQLCancel Core SQLNumParams Core SQLCloseCursor Core SQLNumResultCols Core SQLColAttribute Core SQLParamData Core SQLColumns Core SQLPrepare Core SQLConnect Core SQLPutData Core SQLCopyDesc Core SQLRowCount Core SQLDescribeCol Core SQLSetConnectAttr Core SQLDisconnect Core SQLSetCursorName Core SQLDriverconnect Core SQLSetDescField Core SQLEndTran Core SQLSetDescRec Core SQLExecDirect Core SQLSetEnvAttr Core SQLExecute Core SQLSetStmtAttr Core SQLFetch Core SQLSpecialColumns Cloudera ODBC Driver for Apache Hive | 71 .microsoft.aspx Table 6. Interfaces include both the Unicode and non-Unicode versions. Level 1. Appendix E ODBC API Conformance Level Conformance Level INTERFACES Conformance Level INTERFACES Core SQLFetchScroll Core SQLStatistics Core SQLFreeHandle Core SQLTables Core SQLFreeStmt Core SQLBrowseConnect Core SQLGetConnectAttr Core SQLPrimaryKeys Core SQLGetCursorName Core SQLGetInfo Core SQLGetData Level 1 SQLProcedureColumns Core SQLGetDescField Level 1 SQLProcedures Core SQLGetDescRec Level 2 SQLColumnPrivileges Core SQLGetDiagField Level 2 SQLDescribeParam Core SQLGetDiagRec Level 2 SQLForeignKeys Core SQLGetEnvAttr Level 2 SQLTablePrivileges Core SQLGetFunctions 72 | Cloudera ODBC Driver for Apache Hive .
Copyright © 2024 DOKUMEN.SITE Inc.