Creating a Data Source Name

Typically, after installing the Simba Apache Hive ODBC Connector, you need to create a Data Source Name (DSN). A DSN is a data structure that stores connection information so that it can be used by the connector to connect to Hive.

Alternatively, you can specify connection settings in a connection string or as connector-wide settings. Settings in the connection string take precedence over settings in the DSN, and settings in the DSN take precedence over connector-wide settings.

The following instructions describe how to create a DSN. For information about specifying settings in a connection string, see Using a Connection String. For information about connector-wide settings, see Configuring a DSN-less Connection.

To create a Data Source Name:

  1. From the Start menu, go to ODBC Data Sources.
  2. Note:

    Make sure to select the ODBC Data Source Administrator that has the same bitness as the client application that you are using to connect to Hive.

  3. In the ODBC Data Source Administrator, click the Drivers tab, and then scroll down as needed to confirm that the Simba Apache Hive ODBC Connector appears in the alphabetical list of ODBC drivers that are installed on your system.
  4. Choose one:
    • To create a DSN that only the user currently logged into Windows can use, click the User DSN tab.
    • Or, to create a DSN that all users who log into Windows can use, click the System DSN tab.

    Note:

    It is recommended that you create a System DSN instead of a User DSN. Some applications load the data using a different user account, and might not be able to detect User DSNs that are created under another user account.

  5. Click Add.
  6. In the Create New Data Source dialog box, select Simba Apache Hive ODBC Connector and then click Finish. The Simba Apache Hive ODBC Connector DSN Setup dialog box opens.
  7. In the Data Source Name field, type a name for your DSN.
  8. Optionally, in the Description field, type relevant details about the DSN.
  1. In the Hive Server Type drop-down list, select Hive Server 1 or Hive Server 2.
  2. Note:

    If you are connecting through Apache ZooKeeper, then Hive Server 1 is not supported.

  3. Specify whether the connector uses the ZooKeeper service when connecting to Hive, and provide the necessary connection information:
    • To connect to Hive without using the Apache ZooKeeper service, do the following:
      1. From the Service Discovery Mode drop-down list, select No Service Discovery.
      2. In the Host(s) field, type the IP address or host name of the Hive server.
      3. In the Port field, type the number of the TCP port that the Hive server uses to listen for client connections.
    • Or, to discover Hive Server 2 services via the ZooKeeper service, do the following:
      1. From the Service Discovery Mode drop-down list, select ZooKeeper.
      2. In the Host(s) field, type a comma-separated list of ZooKeeper servers. Use the following format, where [ZK_Host] is the IP address or host name of the ZooKeeper server and [ZK_Port] is the number of the TCP port that the ZooKeeper server uses to listen for client connections:

        [ZK_Host1]:[ZK_Port1],[ZK_Host2]:[ZK_Port2]

      3. In the ZooKeeper Namespace field, type the namespace on ZooKeeper under which Hive Server 2 znodes are added.
  4. In the Database field, type the name of the database schema to use when a schema is not explicitly specified in a query.
  5. Note:

    You can still issue queries on other schemas by explicitly specifying the schema in the query. To inspect your databases and determine the appropriate schema to use, type the show databases command at the Hive command prompt.

  6. In the Authentication area, configure authentication as needed. For more information, see Configuring Authentication.
  7. Note:

    Hive Server 1 does not support authentication. Most default configurations of Hive Server 2 require User Name authentication. To verify the authentication mechanism that you need to use for your connection, check the configuration of your Hadoop / Hive distribution. For more information, see Authentication Mechanisms.

  8. Optionally, if the operations against Hive are to be done on behalf of a user that is different than the authenticated user for the connection, type the name of the user to be delegated in the Delegation UID field. For more information, see Delegating Authentication to a Specific User.
  9. Note:

    This option is applicable only when connecting to a Hive Server 2 instance that supports this feature.

  10. In the Thrift Transport drop-down list, select the transport protocol to use in the Thrift layer.
  11. Note:

    For information about how to determine which Thrift transport protocols your Hive server supports, see Authentication Mechanisms.

  12. If the Thrift Transport option is set to HTTP, then to configure HTTP options such as custom headers, click HTTP Options. For more information, see Configuring HTTP Options.
  13. To configure the connector to connect to Hive through a proxy server, click Proxy Options. For more information, see Configuring a Proxy Connection.
  14. To configure client-server verification over SSL, click SSL Options. For more information, see Configuring SSL Verification.
  15. Note:

    If you selected User Name as the authentication mechanism, SSL is not available.

  16. To configure advanced connector options, click Advanced Options. For more information, see Configuring Advanced Options.
  17. To configure server-side properties, click Advanced Options and then click Server Side Properties. For more information, see Configuring Server-Side Properties.
  18. To configure logging behavior for the connector, click Logging Options. For more information, see Configuring Logging Options.
  19. To test the connection, click Test. Review the results as needed, and then click OK.
  20. Note:

    If the connection fails, then confirm that the settings in the Simba Hive ODBC Driver DSN Setup dialog box are correct. Contact your Hive server administrator as needed.

  21. To save your settings and close the Simba Hive ODBC Driver DSN Setup dialog box, click OK.
  22. To close the ODBC Data Source Administrator, click OK.