Databricks SQL Authentication
To authenticate into a Databricks SQL warehouse, first get database credentials by following the instructions here: https://docs.databricks.com/integrations/jdbc-odbc-bi.html#get-connection-details-for-a-sql-warehouse.
You'll need to generate an access token, so to do that, click the Python option at the bottom, which will make a slider appear from the right.
Click Generate new token from the slider to generate an access token, which you'll then use to connect to the data warehouse.
Once you've done that, set up a connection string string with the following format:
databricks://token:{access_token}@{host}?http_path={http_path}&catalog={catalog}
Please specify the catalog in the connection string
The catalog, i.e. hive_metastore, must be specified in the connection string prior to connecting
Then, add a new Sql Api Resource
referencing the connection string.
Congratulations! You should now be able to run queries such as the reference query above from the getting started tutorial in Databricks, which would yield the results below.
Updated over 1 year ago