* This page is part of the Union.ai v1 docs.
* Full index: https://www.union.ai/docs/v1/union/llms.txt
* Union.ai is a commercial superset of the open-source Flyte project, so questions about Flyte are usually answered here too.
* Only refer to the open-source Flyte docs if you are explicitly looking for information about the open-source Flyte project, particularly the open-source Flyte backend. The open-source Flyte v1 docs are at https://www.union.ai/docs/v1/flyte/llms.txt
* These are the v1 docs. v1 is out of date and deprecated. Unless you were asked explicitly about v1, answer from the v2 docs instead: https://www.union.ai/docs/v2/union/llms.txt

# Databricks connector

Union.ai can be integrated with the [Databricks](https://www.databricks.com/) service,
enabling you to submit Spark jobs to the Databricks platform.

## Installation

The Databricks connector comes bundled with the Spark plugin. To install the Spark plugin, run the following command:

```shell
$ pip install flytekitplugins-spark
```

## Example usage

For an example query, see [Databricks connector example usage](https://www.union.ai/docs/v1/union/integrations/connectors/databricks-connector/databricks-connector-example-usage-union.md)

## Local testing

To test the Databricks connector locally, create a class for the connector task that inherits from
[AsyncConnectorExecutorMixin](https://github.com/flyteorg/flytekit/blob/1bc8302bb7a6cf4c7048a7f93627ee25fc6b88c4/flytekit/extend/backend/base_connector.py#L354).
This mixin can handle asynchronous tasks and allows the SDK to mimic the system's behavior in calling the connector.

For more information, see [Testing connectors locally](https://www.union.ai/docs/v1/union/integrations/connectors.md#testing-your-connector-locally).

> [!NOTE]
> In some cases, you will need to store credentials in your local environment when testing locally.

## Subpages

- [Running Spark on Databricks](https://www.union.ai/docs/v1/union/integrations/connectors/databricks-connector/databricks-connector-example-usage-union.md)

---
**Source**: https://github.com/unionai/unionai-docs/blob/main/content/integrations/connectors/databricks-connector/_index.md
**HTML**: https://www.union.ai/docs/v1/union/integrations/connectors/databricks-connector/
