> ## Documentation Index
> Fetch the complete documentation index at: https://docs.generalvalidation.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Validate Azure Databricks tables

> Add a Fabric shortcut to the tables you build in Azure Databricks, then validate bronze, silver, and gold like any Lakehouse Table.

Azure Databricks keeps each Unity Catalog table as Delta files in an Azure
Data Lake Storage Gen2 account. In this guide, you add a shortcut to those
files in a Fabric Lakehouse, then pair the tables in General Validation, for
example silver to gold. Nothing is copied, and validation runs on your Fabric
capacity, not in Databricks.

This works for
[external tables](https://learn.microsoft.com/azure/databricks/tables/external)
on a storage account you own. Databricks is
[upgrading managed tables](https://learn.microsoft.com/azure/databricks/tables/automatic-upgrades)
to catalog-managed commits, which Fabric can't read through a shortcut, so plan
to validate external tables.

![Screenshot of a General Validation Result comparing silver.orders to gold.daily\_revenue, with two SUM Tests passed.](https://mintcdn.com/general-validation/AYatfL2ahB06Fvw0/images/how-to/databricks-result.png?fit=max\&auto=format\&n=AYatfL2ahB06Fvw0\&q=85\&s=1ae5b6c3eae9d4fa841bf66ffecb22e1)

## Prerequisites

* A General Validation [Environment](https://docs.generalvalidation.com/get-started/environment.md) that is set up.
* A Fabric workspace with a Lakehouse for the shortcuts, with Lakehouse
  schemas turned on so your tables keep names like `silver.orders`. Use a
  workspace other than the dedicated General Validation workspace.
* Databricks external tables on a storage account you own, without row filters
  or column masks.

## Step 1: Find the table's storage location

1. In Azure Databricks, open the **SQL Editor** and run `DESCRIBE DETAIL` on
   the table, for example `DESCRIBE DETAIL sales.silver.orders`.
2. Copy the **location**. It includes the storage account and the table's folder.
3. Check that the table is external: `DESCRIBE TABLE EXTENDED` on the table
   shows **Type** as `EXTERNAL`. A `MANAGED` table may not stay readable
   through a shortcut.

   ![Screenshot of the Databricks SQL Editor with a DESCRIBE DETAIL query and the location column of its result highlighted.](https://mintcdn.com/general-validation/AYatfL2ahB06Fvw0/images/how-to/databricks-describe-detail.png?fit=max\&auto=format\&n=AYatfL2ahB06Fvw0\&q=85\&s=b7f03f6430770ebfa6391fa0160464e5)

> [!NOTE]
>
> If the storage account is in your Databricks workspace's managed resource
> group, usually with a name that starts with `dbstorage`, Fabric can't read it.
> That is where a new workspace's default catalog keeps its tables. Ask your
> Databricks administrator to create the tables you want to validate as external
> tables on a storage account you own.

## Step 2: Add a shortcut to the table

Follow Microsoft's
[Create an Azure Data Lake Storage Gen2 shortcut](https://learn.microsoft.com/fabric/onelake/create-adls-shortcut)
to add a shortcut in your Lakehouse to the storage account from step 1. The
identity the shortcut's connection uses needs read access to that storage
account, such as **Storage Blob Data Reader**. Microsoft's guide lists the
options.

For a Databricks table, set three things as you go:

* Create the shortcut on a schema under **Tables**, such as `silver`:
  right-click the schema and select **New table shortcut**.
* Select the table's own folder, the last part of the location from step 1.
* Before you select **Create**, select the pencil and name the shortcut after
  the table. Otherwise it's named after the folder's ID.

![Screenshot of the shortcut review with the name orders, the edit pencil, and Create highlighted.](https://mintcdn.com/general-validation/AYatfL2ahB06Fvw0/images/how-to/databricks-name-shortcut.png?fit=max\&auto=format\&n=AYatfL2ahB06Fvw0\&q=85\&s=ee2b25f5c9c491c57a82354e379fe040)

Repeat for each table you want to validate.

## Step 3: Pair the tables

1. In General Validation, open **Table Pairs** and select **Add Table Pair**.

2. Choose the Lakehouse's workspace and the Lakehouse for both sides, then the
   tables, such as `silver.orders` and `gold.daily_revenue`.

   ![Screenshot of the Add Table Pair dialog with silver.orders as the source and gold.daily\_revenue as the target highlighted.](https://mintcdn.com/general-validation/AYatfL2ahB06Fvw0/images/how-to/databricks-add-pair.png?fit=max\&auto=format\&n=AYatfL2ahB06Fvw0\&q=85\&s=1dfdc5cafcbcb35f48add4d310b8fae4)

3. Select **Add Table Pair**, give your Environment read access using the
   Table Pair's **Access for validation** snippet in Fabric (unless you already
   included that workspace in `SOURCE_WORKSPACE_IDS`), add Tests, and select
   **Run validation**.

General Validation needs no role on the Azure storage account; reads use the
shortcut's own access once the workspace identity has read access to the
shortcut paths in Fabric.

> [!TIP]
>
> To compare a Databricks table with the source system it was loaded from, pair
> it with a [SQL database table](https://docs.generalvalidation.com/validate-data/sql-databases.md) or another
> Lakehouse or Warehouse Table.

## Limits

* Only tables can be validated. Views and materialized views can't be reached
  through a shortcut.
* General Validation can't read a table that uses Databricks catalog-managed
  commits. Databricks is turning them on for managed tables, so validate
  external tables. A Run on such a table ends with a read error.
* Tables with
  [row filters or column masks](https://learn.microsoft.com/azure/databricks/data-governance/unity-catalog/filters-and-masks/)
  can't be read through a shortcut.
* Deletion vectors, column mapping, liquid clustering, and the other table
  features Databricks turns on by default are read as Databricks reads them.

## Related content

* [Supported data](https://docs.generalvalidation.com/validate-data/supported-data.md)
* [Create Table Pairs](https://docs.generalvalidation.com/validate-data/table-pairs.md)
* [Tests](https://docs.generalvalidation.com/validate-data/tests.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.