Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Connecting Java and Databricks with ADBC

Instructions

Prerequisites

  1. Install Maven

  2. Install dbc

  3. Create a Databricks account or be able to log in to an existing one.

Set up Databricks

  1. Log into Databricks and create or locate an existing SQL warehouse.

  2. Open the "Connection details" tab and record the server hostname and HTTP path. See the Databricks documentation describing how to get these connection details.

Connect to Databricks

  1. Install the Databricks ADBC driver:

    dbc install databricks
  2. Customize the main method in Example.java:

    • Change the connection arguments in the params.put() calls:
    • Change the SQL SELECT statement in stmt.setSqlQuery(), or keep it as is.
      • Specify the catalog and schema by fully qualifying the table name as catalog.schema.table.
  3. Run the Java program:

    mvn compile exec:exec