Area: Ingestion Issues
Sub-Area: Databricks Unity Catalog, Service Principal Permissions
Applies to: OSS + Cloud
Issue
Your Databricks Unity Catalog (unity-catalog) ingestion fails before it ingests any catalogs, schemas or tables. The run report shows events_produced: 0. The logs show a 403 Forbidden response from Databricks on the request that lists catalogs, for example:
GET /api/2.1/unity-catalog/catalogs?include_browse=true&max_results=0
403 Forbidden
User not authorized.
You Might Be Asking
- What Unity Catalog privileges does the DataHub service principal need?
- Why does the ingestion stop before it scans any metadata?
- Did a DataHub upgrade add
include_browse=trueand break my ingestion?
Cause
The connector starts by asking Databricks for the list of catalogs. Every later step works from that list. When Databricks answers 403, the connector has no catalogs to process, so it produces nothing.
The 403 comes from Databricks, not DataHub. The list catalogs call does not fail because of missing catalog grants. Databricks returns only the catalogs the identity owns or holds USE CATALOG on, plus catalogs it holds BROWSE on, because the connector sends include_browse=true. Missing grants give you a short or empty list. A catalog that is not bound to this workspace is also left out. A 403 on this call means Databricks refused the identity itself, before it checked any catalog privileges. The identity comes from one of these recipe options:
-
token(personal access token) -
client_idandclient_secret(Databricks OAuth service principal) -
azure_authwithtenant_id,client_idandclient_secret(Microsoft Entra ID service principal) - None of these set, which makes the connector use Databricks unified authentication (environment variables or a configuration profile)
The include_browse=true and max_results=0 parameters come from the DataHub connector itself. max_results=0 is the default of the databricks_api_page_size option and tells Databricks to use its own page size. The connector sends include_browse=true on its catalog, schema and table calls, and has done so for a long time (it is already in 0.14.1). It is not new in recent releases and does not come from a databricks-sdk upgrade.
Solution
Run these steps as a Databricks metastore admin or a user who can grant privileges on the catalogs you want to ingest.
-
Check that Databricks accepts the identity. First, find the identity the recipe uses (
token,client_id,azure_auth, or unified authentication). The prerequisites in the Databricks source docs cover each authentication option. Then make these checks:- Check that the token or OAuth secret is valid, not expired and not revoked.
- Check that the service principal is added to this Databricks workspace.
- If the workspace uses an IP access list, check that it allows the address the ingestion runs from.
-
Run Test Connection. In the DataHub UI, open the ingestion source in the editor and click Test Connection. The basic connectivity check runs the same catalog list call that failed. If it still fails, the result shows the error Databricks returned.
After the connection succeeds, grant these so the connector can see and read every catalog you want to ingest. Without them, ingestion succeeds but skips catalogs.
- Check the current grants on each catalog you want to ingest:
SHOW GRANTS ON CATALOG <your_catalog>;
- Grant the base privileges. The Provision your service account section lists what the principal needs to ingest metadata and lineage:
USE CATALOGon each catalog,USE SCHEMAon each schema, andSELECTon each table and view. Ownership or the metastore admin role also satisfies the catalog and schema requirements, and ownership satisfies the table requirement.SELECTis part of the base set, not only for profiling.
GRANT USE CATALOG ON CATALOG <your_catalog> TO `<your_principal>`;
GRANT USE SCHEMA ON SCHEMA <your_catalog>.<your_schema> TO `<your_principal>`;
GRANT SELECT ON SCHEMA <your_catalog>.<your_schema> TO `<your_principal>`;
-
If you use system tables for usage or lineage, grant those too. Usage statistics are on by default (
include_usage_statistics: true). Withwarehouse_idset andusage_data_sourceleft atAUTO, or withusage_data_source: SYSTEM_TABLES, the principal needsCAN_USEon the SQL warehouse andSELECTonsystem.query.historyandsystem.access.table_lineage. Withwarehouse_idset andlineage_data_sourceatAUTOorSYSTEM_TABLES, lineage also readssystem.access.column_lineage. Withoutwarehouse_id, usage comes from the REST API, which needsCAN_MANAGEon the SQL warehouse. -
Run the ingestion again.