# Querying Databricks Data

**Prerequisites**:

* [Databricks Unity Catalog integration configured with Immuta](https://documentation.immuta.com/latest/configuration/integrations/databricks/databricks-unity-catalog/how-to-guides/configure)
* [Databricks tables registered as Immuta data sources](https://documentation.immuta.com/latest/configuration/integrations/registering-metadata/data-sources/register-data-sources/databricks-tutorial)

## Query data with Python

1. Create a new workspace.
2. Query the Immuta-protected data as you normally would:

   ```python
   df = spark.sql('select * from database.table_name')
   df.show()
   ```

## Query data with SQL

1. Create a new workspace.
2. Query the Immuta-protected data as you normally would:

   ```sql
   select * from database.table_name;
   ```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.immuta.com/latest/governance/data-consumers/query-data/databricks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
