
## How Databricks ingestion works

To set up a connection with Databricks, Statsig needs the following:

* API Key
* Server Hostname
* HTTP Path

You can use any cluster in your project to connect to your data, but Statsig recommends using a Databricks [SQL warehouse/endpoint](https://docs.databricks.com/sql/admin/sql-endpoints.html) so that the cluster doesn't need to start for every pull.

### API Key

To generate a new API key, go to **User Settings** in your Databricks console and generate a new token as shown below.

{% figure %}
![databricks info](/images/statsig-warehouse-native/connecting-your-warehouse/databricks/188731186-ecdc0872-de06-4576-b387-fa08bdca447d.png)
{% /figure %}

You can also use a personal access token for a service principal. Generate one by following the steps in [Manage personal access tokens for a service principal](https://docs.databricks.com/en/administration-guide/users-groups/service-principals.html#manage-personal-access-tokens-for-a-service-principal).

### Server Hostname & HTTP Path

Find your Server Hostname and HTTP Path in your Databricks console by navigating to your cluster, selecting the **Configuration** tab, and expanding **Advanced options**.

{% figure %}
![credentials](/images/statsig-warehouse-native/connecting-your-warehouse/databricks/242474157-e6329ea8-92ae-43af-95dc-7bce2a26a3e6.png)
{% /figure %}
