> For the complete documentation index, see [llms.txt](https://v2.dataos.info/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://v2.dataos.info/references/resources/depot/supported-sources/databricks.md).

# Databricks

Create a Depot resource for Databricks workspaces.

To create a Databricks Depot you must have the following details:

## Pre-requisites specific to DataOS

A user with the Tenant Admin, Data Admin, or Data Developer Tenant role can create a Depot.

See [Depot: Access control](https://v2.dataos.info/operate/access-control/roles-and-permissions/resource-level-permissions/depot-access-control) for who can create a Depot and how access to it is managed.

Run the command below to check your assigned roles.

```bash
dataos-ctl user get
#Expected Output: 
time="2026-03-30T17:49:18+05:30" level=info msg="😃 user get..."
time="2026-03-30T17:49:19+05:30" level=info msg="😃 user get...complete"

     NAME     │        ID         │  TYPE  │        EMAIL         │                  TAGS
──────────────┼───────────────────┼────────┼──────────────────────┼────────────────────────────────────────
 I Am Groot   │ iamgroottmdcio    │ person │ iam.groot@tmdc.io    │ roles:id:data-admin,
              │                   │        │                      │ roles:id:user,
              │                   │        │                      │ users:id:iamgroottmdcio

```

## Pre-requisites specific to the source system

* **Server Hostname**: The hostname of your Databricks workspace, in the format `<workspace-id>.cloud.databricks.com`.
* **HTTP Path**: The HTTP path of the SQL warehouse or cluster, for example `/sql/1.0/warehouses/<warehouse-id>`.
* **Token**: A Databricks personal access token or service principal token used for authentication. Obtain this from the Databricks workspace under **Settings → Developer → Access Tokens**.

## Create a Databricks Depot

A Depot of type `DATABRICKS` reads data from Databricks SQL warehouses. To create a Depot of type `DATABRICKS`, follow these steps:

### **Step 1: Create a Secret for securing Databricks credentials**

Begin by creating a Secret Resource by following the [Databricks](https://v2.dataos.info/references/resources/secret/data-sources/databricks.md) guide.

### **Step 2: Create a Databricks Depot manifest file**

Create a manifest file with the configuration details for your Databricks Depot. Reference the Secret by name in the Depot manifest as shown in the template below.

{% tabs %}
{% tab title="Manifest file" %}

```yaml
version: v2alpha
type: depot
tags:
  - ${{tag-1}} # optional
  - ${{tag-2}} # optional
name: depotname
owner: ${{owner-id}}
tenant: ${{tenant-id}}
spec:
  name: depotname
  type: databricks
  owners:
    - ${{owner-id}}
  description: ${{depot-description}}
  source: databricks
  spec:
    http_path: ${{http-path}} #mandatory
    server_hostname: ${{server-hostname}} #mandatory
  secrets:
    - id: ${{tenant-id}}:${{secret-name}}
      purpose: scan
    - id: ${{tenant-id}}:${{secret-name}}
      purpose: query
    - id: ${{tenant-id}}:${{secret-name}}
      purpose: rw
```

{% endtab %}

{% tab title="Example" %}

```yaml
version: v2alpha
type: depot
tags:
  - dataos:type:resource
  - dataos:type:tenant-resource
  - dataos:resource:depot
  - dataos:tenant:engineering
name: databricks
owner: iamgroottmdcio
tenant: engineering
spec:
  name: databricks
  type: databricks
  owners:
    - iamgroottmdcio
  description: Databricks Depot
  source: databricks
  spec:
    http_path: /sql/1.0/warehouses/**********
    server_hostname: '**********'
  secrets:
    - id: engineering:secrets-databricks
      purpose: scan
    - id: engineering:secrets-databricks
      purpose: query
    - id: engineering:secrets-databricks
      purpose: rw
```

{% endtab %}
{% endtabs %}

### **Step 3: Apply the Depot manifest file**

Apply the manifest through the DataOS CLI:

```bash
dataos-ctl resource apply -f ${{yamlfilepath}}
```

## Verify the Depot creation

Verify the Depot in two ways:

* Check the name of the newly created Depot in the list of Depots you own:

  ```bash
  dataos-ctl resource get -t depot
  ```
* List all Depots created in the current Tenant:

  ```bash
  dataos-ctl resource get -t depot -a
  ```

## Delete a Depot

{% hint style="warning" %}
Best practice: Delete Resources that are no longer in use to save time and reduce costs.
{% endhint %}

To delete a Depot, run the following command in the DataOS CLI:

{% tabs %}
{% tab title="Command 1" %}

```bash
dataos-ctl resource delete -t depot -n depotname
```

{% endtab %}

{% tab title="Command 2 " %}

```bash
dataos-ctl resource delete -i "${resource-name}|v2alpha|depot"
```

{% endtab %}

{% tab title="Command 3" %}

```bash
dataos-ctl resource delete -f ${manifest-file-path}
```

{% endtab %}
{% endtabs %}

Specify the Resource type and Depot name in the `delete` command.

**Example Usage:**

{% tabs %}
{% tab title="Command 1" %}

```bash
dataos-ctl resource delete -t depot -n databricks
#output
time="2026-03-25T15:53:55+05:30" level=info msg="🗑 delete..."
time="2026-03-25T15:53:55+05:30" level=info msg="🗑 deleting databricks:v2alpha:depot..."
time="2026-03-25T15:53:56+05:30" level=info msg="🗑 deleting databricks:v2alpha:depot...deleted"
time="2026-03-25T15:53:56+05:30" level=info msg="🗑 delete...complete"
```

{% endtab %}

{% tab title="Command 2" %}

```bash
dataos-ctl resource delete -i "databricks|v2alpha|depot"
#output
time="2026-03-25T15:55:37+05:30" level=info msg="🗑 delete..."
time="2026-03-25T15:55:37+05:30" level=info msg="🗑 deleting databricks:v2alpha:depot..."
time="2026-03-25T15:55:37+05:30" level=info msg="🗑 deleting databricks:v2alpha:depot...deleted"
time="2026-03-25T15:55:37+05:30" level=info msg="🗑 delete...complete"
```

{% endtab %}

{% tab title="Command 3" %}

```bash
dataos-ctl resource delete -f /path/to/depot.yaml
#output
time="2026-03-25T15:53:55+05:30" level=info msg="🗑 delete..."
time="2026-03-25T15:53:55+05:30" level=info msg="🗑 deleting databricks:v2alpha:depot..."
time="2026-03-25T15:53:56+05:30" level=info msg="🗑 deleting databricks:v2alpha:depot...deleted"
time="2026-03-25T15:53:56+05:30" level=info msg="🗑 delete...complete"
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://v2.dataos.info/references/resources/depot/supported-sources/databricks.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
