แชร์ผ่าน


Create an ODBC DSN for the Databricks ODBC Driver

This page describes how to create an ODBC Data Source Name (DSN) for the Databricks ODBC Driver.

Create your DSN as follows, depending on your operating system.

Create an ODBC DSN with Windows

  1. From the Start menu, search for ODBC Data Sources to launch the ODBC Data Source Administrator.

  2. Click the Drivers tab to verify that the ODBC Driver is installed.

  3. Click the User DSN or System DSN tab and then click Add.

  4. Select Databricks ODBC Driver from the list of installed drivers and then click Finish.

  5. In the Databricks ODBC Driver DSN Setup dialog, configure the following settings:

    Field Value
    Data Source Name A name for the DSN.
    Host(s) The Server Hostname value from your Azure Databricks compute resource.
    Port 443
    Mechanism An authentication mechanism. See Authentication settings for the Databricks ODBC Driver.

    Configure the following additional settings:

    • Click HTTP Options. In the dialog, enter the HTTP Path value from your Azure Databricks compute resource and then click OK.
    • Click SSL Options. In the dialog, select the Enable SSL check box and then click OK.

    To get the Server Hostname and HTTP Path values, see Compute settings for the Databricks ODBC Driver.

  6. Click Test to verify the connection. Review the results and then click OK.

  7. Click OK to finish creating the DSN.

To use your DSN with your target app, tool, client, SDK, or API, see Technology partners or your provider's documentation.

Create an ODBC DSN with macOS

  1. Install ODBC Manager for macOS in one of the following ways:

  2. Start ODBC Manager.

  3. Click the Drivers tab to verify that the ODBC driver is installed.

  4. Click the User DSN or System DSN tab and then click Add.

  5. Select Databricks ODBC Driver from the list of installed drivers and then click OK.

  6. Enter a name for the DSN. Using the ODBC Manager keyword-value interface, add the following configuration settings:

    Keyword Value
    Driver The driver's full installation path. See Download and install the Databricks ODBC Driver.
    Host The Server Hostname value from your Azure Databricks compute resource.
    Port 443
    HTTPPath The HTTP Path value from your Azure Databricks compute resource.
    SSL 1
    ThriftTransport 2

    To get the Server Hostname and HTTP Path values, see Compute settings for the Databricks ODBC Driver. Add your authentication settings and any special or advanced driver capability settings.

  7. Click OK to finish creating the DSN.

To use your DSN with your target app, tool, client, SDK, or API, see Technology partners or your provider's documentation.

Create an ODBC DSN with Linux

  1. Install unixODBC.

  2. Locate the odbc.ini driver configuration file that corresponds to SYSTEM DATA SOURCES:

    odbcinst -j
    
  3. In a text editor, open the odbc.ini configuration file.

  4. Create an [ODBC Data Sources] section:

    [ODBC Data Sources]
    Databricks=Databricks ODBC Connector
    
  5. Create another section with the same name as your DSN as follows:

    [Databricks]
    Driver=<path-to-driver>
    Host=<server-hostname>
    Port=443
    HTTPPath=<http-path>
    SSL=1
    ThriftTransport=2
    <setting1>=<value1>
    <setting2>=<value2>
    <settingN>=<valueN>
    

To use your DSN with your target app, tool, client, SDK, or API, see Technology partners or your provider's documentation.

Next steps