Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

Connecting Go and Databricks with ADBC

Instructions

Prerequisites

  1. Install Go

  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 Go program main.go:

    • Change the connection arguments in the NewDatabase() call:
    • 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 Go program:

    go mod tidy
    go run main.go