Airflow Summit 2021 is coming July 8-16. Register now!

Databricks Connection

The Databricks connection type enables the Databricks Integration.

Authenticating to Databricks

There are two ways to connect to Databricks using Airflow.

  1. Use a Personal Access Token (PAT) i.e. add a token to the Airflow connection. This is the recommended method.

  2. Use Databricks login credentials i.e. add the username and password used to login to the Databricks account to the Airflow connection.

Default Connection IDs

Hooks and operators related to Databricks use databricks_default by default.

Configuring the Connection

Host (required)

Specify the Databricks workspace URL

Login (optional)

Specify the username used to login to Databricks. This is only needed if using the Databricks login credentials authentication method.

Password (optional)

Specify the password used to login to Databricks. This is only needed if using the Databricks login credentials authentication method.

Extra (optional)

Specify the extra parameter (as json dictionary) that can be used in the Databricks connection. This parameter is necessary if using the PAT authentication method (recommended):

  • token: Specify PAT to use.

When specifying the connection using an environment variable you should specify it using URI syntax.

Note that all components of the URI should be URL-encoded.

For example:

export AIRFLOW_CONN_DATABRICKS_DEFAULT='databricks://@host-url?token=yourtoken'

Was this entry helpful?