Skip to content

Unity Catalog

Catalogs, tables, columns, grants, tags and lineage of open-source Unity Catalog or Databricks

Connector software
Free and open source
Service credentials
Required
Use with an agent

Install the Orchard skill in your project to help your agent find connectors, configure them, and verify SQL results.

npx skills add Query-farm/vgi-skills --skill orchard

Copy this request into your coding agent to get started.

Use https://query.farm/products/orchard/connectors/unity-catalog/index.md to help me query Unity Catalog with DuckDB or Haybarn 2.0.1 and VGI protocol 3.4. Ask only for missing details about the result I need or whether I want local execution, self-hosting or Query Farm hosting. Check the connector's actual hosting availability, credentials and input requirements. Read one format of each needed reference and the exact object declarations before writing SQL. Use a released connector, and distinguish a saved example result from anything you actually execute. If you cannot run the query, tell me what remains to verify.

Compare table types and formats in your catalog

Replace sales with the name of your Unity Catalog catalog.

Uses your connected account. Set up the connector and credentials to run it with your data.

SELECT table_type, data_source_format, count(*) AS tables
FROM unity_catalog.main.datasets
WHERE catalog_name = 'sales'
GROUP BY ALL
ORDER BY tables DESC

Quick start

Choose where to run Unity Catalog, then follow the steps below.

The connector runs alongside DuckDB or Haybarn. No Query Farm account is needed.

1. Install the vgi extension

Run this in your SQL client. On DuckDB, keep FROM query_farm on LOAD in later sessions.

setup.sql
SET allow_extension_repositories = 'allowed';

CREATE EXTENSION REPOSITORY IF NOT EXISTS query_farm
    WITH PREFIX 'https://duckdb-extensions.query.farm';

INSTALL vgi FROM query_farm;
LOAD vgi FROM query_farm;

2. Attach the connector

Attach with uvx

Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.

ATTACH 'unity_catalog' AS unity_catalog (
  TYPE vgi,
  LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-unity-catalog-worker'
);

3. Add service credentials

After attaching, create the secret for the service you want to query in the same SQL session. Replace the placeholders with your service settings.

unity_catalog credentials

Connection to a Unity Catalog server: an open-source Unity Catalog server URL, or a Databricks workspace URL plus a personal access token, an OAuth service principal (client id + secret) or an Azure AD token.

Get these credentials →
secret.sql
CREATE SECRET unity_catalog (
    TYPE unity_catalog,
    host           '<host>',  -- required
    token          '<UNITY_CATALOG_TOKEN>',  -- secret
    client_id      '<client_id>',
    client_secret  '<UNITY_CATALOG_CLIENT_SECRET>',  -- secret
    azure_token    '<AZURE_TOKEN>',  -- secret
    auth_type      '<auth_type>',
    flavor         '<flavor>',
    include_browse '<include_browse>',
    page_size      '<page_size>',
    timeout        '<timeout>'
);
Credential fields and requirements →

4. Run a query

query.sql
SELECT table_type, data_source_format, count(*) AS tables
FROM unity_catalog.main.datasets
WHERE catalog_name = 'sales'
GROUP BY ALL
ORDER BY tables DESC
More example queries →
Technical details
Verified connector release
v0.2.0
Engine
2.0.1
VGI protocol
3.4.0
Verified on
December 1, 2026
Release notes on GitHub
Pin a version for production

When running the connector yourself, keep a specific release until you’re ready to upgrade. Replace the ATTACH statement above with this one and follow the same extension and credential setup.

Attach with uvx

Needs uv. uvx builds the worker from its release tag on first attach and reuses the cached environment after that.

ATTACH 'unity_catalog' AS unity_catalog (
  TYPE vgi,
  LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-unity-catalog-worker'
);

Overview

Unity Catalog metadata (open-source Unity Catalog and Databricks) as SQL tables: catalogs, schemas, tables and columns, volumes, functions, models, grants, owners, tags and lineage. Read-only.

Catalog

Everything unity_catalog exposes once attached — read straight from the worker's released build.

unity_catalog 1 schema
main 21 tables · 2 functions

One Unity Catalog metastore's metadata, read-only, keyed by full object names.

Schema examples (23)
Examples (23)

The metastore id and region

SELECT metastore_id, cloud, region FROM unity_catalog.main.metastores;

Catalogs by type and owner

SELECT name, catalog_type, owner
FROM unity_catalog.main.catalogs
ORDER BY name;

Schemas of one catalog (catalog_name is sent to the API)

SELECT name, owner, description
FROM unity_catalog.main.schemas
WHERE catalog_name = 'sales'
ORDER BY name;

Tables per type and format in one catalog (only that catalog's schemas are listed)

SELECT table_type, data_source_format, count(*) AS tables
FROM unity_catalog.main.datasets
WHERE catalog_name = 'sales'
GROUP BY ALL
ORDER BY tables DESC;
19 more examples

Views that read a given table

SELECT id
FROM unity_catalog.main.views
WHERE view_definition ILIKE '%sales.raw.orders%'
ORDER BY id;

Partition columns of one table (fetched with one GET /tables call)

SELECT column_name, native_data_type, partition_index
FROM unity_catalog.main.columns
WHERE dataset_id = 'sales.raw.orders' AND partition_index IS NOT NULL
ORDER BY partition_index;

External volumes and where their files live

SELECT id, storage_location
FROM unity_catalog.main.volumes
WHERE volume_type = 'EXTERNAL'
ORDER BY id;

SQL functions and their parameter counts

SELECT id, len(parameters) AS params, full_data_type
FROM unity_catalog.main.functions
WHERE routine_body = 'SQL'
ORDER BY id;

Registered models per catalog

SELECT catalog_name, count(*) AS models
FROM unity_catalog.main.registered_models
GROUP BY ALL
ORDER BY ALL;

Latest ready version of each model

SELECT model_id, max(version) AS latest
FROM unity_catalog.main.model_versions
WHERE status = 'READY'
GROUP BY ALL
ORDER BY model_id;

External locations and their credentials

SELECT name, url, credential_name
FROM unity_catalog.main.external_locations
ORDER BY name;

Storage credentials by kind

SELECT credential_type, count(*) AS credentials
FROM unity_catalog.main.storage_credentials
GROUP BY ALL
ORDER BY ALL;

Federated connections and their hosts

SELECT name, connection_type, options['host'] AS host
FROM unity_catalog.main.connections
ORDER BY name;

Delta Sharing shares and owners

SELECT name, owner, created_at FROM unity_catalog.main.shares ORDER BY name;

Recipients that have not activated

SELECT name, authentication_type
FROM unity_catalog.main.recipients
WHERE NOT activated
ORDER BY name;

Who can SELECT from tables in one catalog

SELECT securable_name, principal
FROM unity_catalog.main.grants
WHERE securable_type = 'table' AND catalog_name = 'sales' AND privilege = 'SELECT'
ORDER BY ALL;

Inherited privileges on one table

SELECT principal, privilege, inherited_from_type, inherited_from_name
FROM unity_catalog.main.effective_grants
WHERE securable_type = 'table' AND securable_name = 'sales.raw.orders'
ORDER BY ALL;

Objects owned per principal

SELECT owner_id, entity_type, count(*) AS objects
FROM unity_catalog.main.owners
GROUP BY ALL
ORDER BY objects DESC;

Governed tags and their allowed values

SELECT name, allowed_values FROM unity_catalog.main.tags ORDER BY name;

Columns tagged as PII in one catalog

SELECT entity_id, column_name, tag_value
FROM unity_catalog.main.tag_assignments
WHERE entity_type = 'column' AND catalog_name = 'sales' AND tag_key = 'pii'
ORDER BY ALL;

What feeds one table (only that table's lineage is requested)

SELECT upstream_id, upstream_type
FROM unity_catalog.main.lineage_edges
WHERE level = 'dataset' AND downstream_id = 'sales.marts.daily_revenue'
ORDER BY ALL;

Look a table up by a name typed in any case

SELECT d.id, d.owner
FROM unity_catalog.main.datasets d
WHERE d.qualified_name = unity_catalog.main.uc_qualified_name('Sales.Raw.Orders');

Who can read which table, with the privilege typed as in a GRANT statement

SELECT securable_name, principal
FROM unity_catalog.main.grants
WHERE securable_type = 'table' AND privilege = unity_catalog.main.uc_privilege('select')
ORDER BY ALL;
Tables
catalogs 1 example23 cols

Unity Catalog catalogs with type, owner, properties and storage root.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
idnot null VARCHAR
Catalog name (Unity Catalog's full name of a catalog).
platform VARCHAR
'databricks' for a Databricks workspace, 'unity_catalog' for open source.
namenot null VARCHAR
Catalog name.
qualified_name VARCHAR
Lower-cased catalog name.
description VARCHAR
Catalog comment.
catalog_type VARCHAR
Databricks: MANAGED_CATALOG, DELTASHARING_CATALOG, FOREIGN_CATALOG, SYSTEM_CATALOG, ...
owner VARCHAR
Owner principal (user, group or service principal).
properties MAP(VARCHAR, VARCHAR)
User-defined key/value properties.
storage_root VARCHAR
Managed storage root URL set on the catalog.
storage_location VARCHAR
Effective managed storage location.
provider_name VARCHAR
Delta Sharing provider of a shared catalog.
share_name VARCHAR
Delta Sharing share a shared catalog mounts.
connection_name VARCHAR
Lakehouse Federation connection of a foreign catalog.
isolation_mode VARCHAR
OPEN or ISOLATED (bound to specific workspaces).
browse_only BOOLEAN
True when the principal can only browse it (include_browse).
metastore_id VARCHAR
Metastore the catalog belongs to.
uuid VARCHAR
Catalog UUID.
created_at TIMESTAMP WITH TIME ZONE
When the object was created.
created_by VARCHAR
Principal that created the object.
updated_at TIMESTAMP WITH TIME ZONE
When the object was last changed.
updated_by VARCHAR
Principal that last changed the object.
url VARCHAR
Catalog Explorer link (Databricks only).
ConstraintsPRIMARY KEY (id) · FOREIGN KEY (metastore_id) REFERENCES metastores(metastore_id)
Example

Catalogs by type and owner

SELECT name, catalog_type, owner
FROM unity_catalog.main.catalogs
ORDER BY name;
Link
columns 2 examples21 cols

Columns of every Unity Catalog table and view, with types and partitioning.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
dataset_idnot null VARCHAR
Full name of the table (datasets.id).
platform VARCHAR
'databricks' or 'unity_catalog'.
qualified_name VARCHAR
Lower-cased 'catalog.schema.table' of the table.
catalog_namenot null VARCHAR
Catalog of the table.
schema_namenot null VARCHAR
Schema of the table.
table_namenot null VARCHAR
Short name of the table or view the column belongs to.
column_namenot null VARCHAR
Name of the column as declared in the table schema.
ordinal_positionnot null INTEGER
1-based position in the table.
data_type VARCHAR
Unity Catalog type name: INT, LONG, STRING, DECIMAL, STRUCT, ARRAY, ...
native_data_type VARCHAR
Full Spark SQL type text, e.g. 'decimal(18,2)', 'array<string>'.
type_json VARCHAR
The Spark StructField JSON of the column (JSON text).
type_precision INTEGER
Decimal precision (0 when not applicable).
type_scale INTEGER
Decimal scale (0 when not applicable).
type_interval_type VARCHAR
Interval qualifier for INTERVAL columns.
nullablenot null BOOLEAN
True if the column accepts NULL.
is_primary_keynot null BOOLEAN
True if the column is in the table's primary key constraint.
partition_index INTEGER
Partition order as a 0-based count (0 = first partition column); NULL for a column that does not partition the table.
description VARCHAR
Column comment.
tags VARCHAR[]
Databricks column tags as 'key' or 'key=value' (one extra request per column, only when selected); NULL when the server has no tags API.
glossary_terms VARCHAR[]
Not tracked by Unity Catalog; always empty (shared vocabulary).
ConstraintsPRIMARY KEY (dataset_id, column_name) · FOREIGN KEY (dataset_id) REFERENCES datasets(id)
Examples (2)

Partition columns of one table (fetched with one GET /tables call)

SELECT column_name, native_data_type, partition_index
FROM unity_catalog.main.columns
WHERE dataset_id = 'sales.raw.orders' AND partition_index IS NOT NULL
ORDER BY partition_index;

Columns whose comment mentions PII

SELECT dataset_id, column_name
FROM unity_catalog.main.columns
WHERE catalog_name = 'sales' AND description ILIKE '%pii%'
ORDER BY ALL;
Link
connections 1 example15 cols

Lakehouse Federation connections (Databricks), options masked.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
idnot null VARCHAR
Connection name.
namenot null VARCHAR
Connection name.
connection_type VARCHAR
MYSQL, POSTGRESQL, SNOWFLAKE, SQLSERVER, BIGQUERY, ...
credential_type VARCHAR
USERNAME_PASSWORD, OAUTH, ...
options MAP(VARCHAR, VARCHAR)
Connection options; values other than host, port, database, warehouse, httpPath and similar settings are masked as '****'.
read_only BOOLEAN
True for read-only connections.
provisioning_state VARCHAR
Provisioning state, e.g. ACTIVE.
description VARCHAR
Comment.
owner VARCHAR
Owner principal.
uuid VARCHAR
Connection UUID.
created_at TIMESTAMP WITH TIME ZONE
When the object was created.
created_by VARCHAR
Principal that created the object.
updated_at TIMESTAMP WITH TIME ZONE
When the object was last changed.
updated_by VARCHAR
Principal that last changed the object.
ConstraintsPRIMARY KEY (id)
Example

Federated connections and their hosts

SELECT name, connection_type, options['host'] AS host
FROM unity_catalog.main.connections
ORDER BY name;
Link
datasets 2 examples35 cols

Unity Catalog tables and views in the shared data-catalog vocabulary.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
idnot null VARCHAR
Table full name, 'catalog.schema.table'.
platform VARCHAR
'databricks' for a Databricks workspace, 'unity_catalog' for open source.
environment VARCHAR
Not tracked by Unity Catalog; always NULL (shared vocabulary).
databasenot null VARCHAR
Catalog of the table (the vocabulary's database part).
schemanot null VARCHAR
Schema of the table.
namenot null VARCHAR
Table name.
qualified_name VARCHAR
Lower-cased 'catalog.schema.table'; the join key to dbt, OpenLineage, Looker and the other catalog workers.
catalog_namenot null VARCHAR
Catalog of the table (same as database).
schema_namenot null VARCHAR
Schema of the table (same as schema).
subtype VARCHAR
Lower-cased table_type: managed, external, view, materialized_view, ...
table_type VARCHAR
MANAGED, EXTERNAL, VIEW, MATERIALIZED_VIEW, STREAMING_TABLE, METRIC_VIEW, FOREIGN, ...
data_source_format VARCHAR
DELTA, ICEBERG, PARQUET, CSV, JSON, ... (NULL for views).
storage_location VARCHAR
Storage URL of the table's files.
view_definition VARCHAR
SQL text of a view (NULL for tables).
description VARCHAR
Table comment.
owner VARCHAR
Owner principal.
owners VARCHAR[]
Owner as a one-element list (shared vocabulary); see the owners table.
tags VARCHAR[]
Databricks governed / user tags as 'key' or 'key=value' (one extra request per table, only when selected); NULL when the server has no tags API.
glossary_terms VARCHAR[]
Not tracked by Unity Catalog; always empty (shared vocabulary).
domain_id VARCHAR
Not tracked by Unity Catalog; always NULL (shared vocabulary).
domain VARCHAR
Not tracked by Unity Catalog; always NULL (shared vocabulary).
container_id VARCHAR
Parent schema full name, 'catalog.schema' (schemas.id).
deprecatednot null BOOLEAN
Always false: Unity Catalog has no deprecation flag.
custom_properties MAP(VARCHAR, VARCHAR)
Table properties (TBLPROPERTIES).
column_count INTEGER
Number of columns.
partition_columns VARCHAR[]
Partition columns in partition order.
uuid VARCHAR
Table UUID.
metastore_id VARCHAR
Metastore the table belongs to.
browse_only BOOLEAN
True when the principal can only browse it.
created_at TIMESTAMP WITH TIME ZONE
When the object was created.
created_by VARCHAR
Principal that created the object.
updated_at TIMESTAMP WITH TIME ZONE
When the object was last changed.
updated_by VARCHAR
Principal that last changed the object.
url VARCHAR
Catalog Explorer link (Databricks only).
ConstraintsPRIMARY KEY (id) · FOREIGN KEY (metastore_id) REFERENCES metastores(metastore_id)
Examples (2)

Tables per type and format in one catalog (only that catalog's schemas are listed)

SELECT table_type, data_source_format, count(*) AS tables
FROM unity_catalog.main.datasets
WHERE catalog_name = 'sales'
GROUP BY ALL
ORDER BY tables DESC;

External tables without a comment

SELECT id, storage_location
FROM unity_catalog.main.datasets
WHERE table_type = 'EXTERNAL' AND description IS NULL
ORDER BY id;
Link
effective_grants 1 example9 cols

Effective (direct and inherited) privileges per securable (Databricks).

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
securable_typenot null VARCHAR
metastore, catalog, schema, table, volume, function, registered_model, external_location or storage_credential.
securable_namenot null VARCHAR
Full name of the securable (the metastore id for metastore).
catalog_name VARCHAR
Catalog of a catalog-scoped securable.
principalnot null VARCHAR
User email, group name or service principal application id.
principal_type VARCHAR
Best guess from the name: user (has @), service_principal (UUID), else group.
privilegenot null VARCHAR
Privilege, Databricks spelling: USE_CATALOG, SELECT, MODIFY, ...
inherited_from_type VARCHAR
Securable type the privilege is inherited from; NULL when granted directly.
inherited_from_name VARCHAR
Full name of the securable it is inherited from.
Example

Inherited privileges on one table

SELECT principal, privilege, inherited_from_type, inherited_from_name
FROM unity_catalog.main.effective_grants
WHERE securable_type = 'table' AND securable_name = 'sales.raw.orders'
ORDER BY ALL;
Link
external_locations 1 example14 cols

External locations: governed cloud storage paths.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
idnot null VARCHAR
External location name (unique in the metastore).
namenot null VARCHAR
External location name.
url VARCHAR
Storage URL the location governs, e.g. 's3://bucket/path'.
credential_name VARCHAR
Storage credential used to reach it (storage_credentials.name).
read_only BOOLEAN
True for a read-only location (Databricks).
isolation_mode VARCHAR
OPEN or ISOLATED (Databricks).
description VARCHAR
Comment.
owner VARCHAR
Owner principal.
uuid VARCHAR
External location UUID (open source).
created_at TIMESTAMP WITH TIME ZONE
When the object was created.
created_by VARCHAR
Principal that created the object.
updated_at TIMESTAMP WITH TIME ZONE
When the object was last changed.
updated_by VARCHAR
Principal that last changed the object.
ConstraintsPRIMARY KEY (id)
Example

External locations and their credentials

SELECT name, url, credential_name
FROM unity_catalog.main.external_locations
ORDER BY name;
Link
functions 1 example28 cols

Unity Catalog user-defined functions with parameters and bodies.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
idnot null VARCHAR
Function full name, 'catalog.schema.function'.
platform VARCHAR
'databricks' for a Databricks workspace, 'unity_catalog' for open source.
catalog_namenot null VARCHAR
Catalog of the function.
schema_namenot null VARCHAR
Schema of the function.
namenot null VARCHAR
Function name.
qualified_name VARCHAR
Lower-cased 'catalog.schema.function'.
description VARCHAR
Function comment.
data_type VARCHAR
Return type name; TABLE_TYPE for table functions.
full_data_type VARCHAR
Full return type text, e.g. 'DECIMAL(18,2)'.
parameters STRUCT of 7 fields[]
Input parameters: STRUCT(name, type_text, type_name, position, parameter_mode, parameter_default, comment)[].
STRUCT[] 7 fields
  • nameVARCHAR
  • type_textVARCHAR
  • type_nameVARCHAR
  • positionINTEGER
  • parameter_modeVARCHAR
  • parameter_defaultVARCHAR
  • commentVARCHAR
return_columns STRUCT of 7 fields[]
Result columns of a table function (same shape).
STRUCT[] 7 fields
  • nameVARCHAR
  • type_textVARCHAR
  • type_nameVARCHAR
  • positionINTEGER
  • parameter_modeVARCHAR
  • parameter_defaultVARCHAR
  • commentVARCHAR
routine_body VARCHAR
SQL or EXTERNAL.
routine_definition VARCHAR
Function body (SQL expression or external code).
external_language VARCHAR
Language of an EXTERNAL function, e.g. 'python'.
is_deterministic BOOLEAN
Whether the function is deterministic.
is_null_call BOOLEAN
True when the function returns NULL for any NULL argument.
sql_data_access VARCHAR
CONTAINS_SQL, READS_SQL_DATA or NO_SQL.
security_type VARCHAR
DEFINER.
specific_name VARCHAR
Specific name of the function.
routine_dependencies VARCHAR[]
Full names of the tables and functions the body uses.
owner VARCHAR
Owner principal.
uuid VARCHAR
Function UUID.
created_at TIMESTAMP WITH TIME ZONE
When the object was created.
created_by VARCHAR
Principal that created the object.
updated_at TIMESTAMP WITH TIME ZONE
When the object was last changed.
updated_by VARCHAR
Principal that last changed the object.
url VARCHAR
Catalog Explorer link (Databricks only).
ConstraintsPRIMARY KEY (id)
Example

SQL functions and their parameter counts

SELECT id, len(parameters) AS params, full_data_type
FROM unity_catalog.main.functions
WHERE routine_body = 'SQL'
ORDER BY id;
Link
grants 2 examples7 cols

Explicit privilege grants on every Unity Catalog securable.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
securable_typenot null VARCHAR
metastore, catalog, schema, table, volume, function, registered_model, external_location or storage_credential.
securable_namenot null VARCHAR
Full name of the securable (the metastore id for metastore).
catalog_name VARCHAR
Catalog of a catalog-scoped securable.
principalnot null VARCHAR
User email, group name or service principal application id.
principal_type VARCHAR
Best guess from the name: user (has @), service_principal (UUID), else group.
privilegenot null VARCHAR
Privilege, Databricks spelling: USE_CATALOG, SELECT, MODIFY, ...
ConstraintsPRIMARY KEY (securable_type, securable_name, principal, privilege)
Examples (2)

Who can SELECT from tables in one catalog

SELECT securable_name, principal
FROM unity_catalog.main.grants
WHERE securable_type = 'table' AND catalog_name = 'sales' AND privilege = 'SELECT'
ORDER BY ALL;

Privileges held by one user across the metastore

SELECT securable_type, securable_name, privilege
FROM unity_catalog.main.grants
WHERE principal = '[email protected]'
ORDER BY ALL;
Link
lineage_edges 2 examples13 cols

Table and column lineage captured by Databricks, in the shared vocabulary.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
levelnot null VARCHAR
'dataset' (table/entity to table/entity) or 'column'.
upstream_idnot null VARCHAR
Upstream table full name, or '<workspace_id>/<id>' of a notebook, job, query, dashboard or pipeline.
upstream_type VARCHAR
dataset, notebook, job, query, dashboard or pipeline.
upstream_qualified_name VARCHAR
Lower-cased full name when upstream is a table.
upstream_column VARCHAR
Upstream column (column level only).
downstream_idnot null VARCHAR
Downstream table full name, or '<workspace_id>/<id>' of the entity that reads the table.
downstream_type VARCHAR
dataset, notebook, job, query, dashboard or pipeline.
downstream_qualified_name VARCHAR
Lower-cased full name when downstream is a table.
downstream_column VARCHAR
Downstream column (column level only).
transformation VARCHAR
Not reported by the Data Lineage API; always NULL.
via VARCHAR[]
Notebooks, jobs, ... ('<type>:<workspace_id>/<id>') that moved data along a table-to-table edge.
lineage_timestamp TIMESTAMP WITH TIME ZONE
When Databricks last observed the edge, when reported.
Examples (2)

What feeds one table (only that table's lineage is requested)

SELECT upstream_id, upstream_type
FROM unity_catalog.main.lineage_edges
WHERE level = 'dataset' AND downstream_id = 'sales.marts.daily_revenue'
ORDER BY ALL;

Column-level impact of changing one table

SELECT upstream_column, downstream_id, downstream_column
FROM unity_catalog.main.lineage_edges
WHERE level = 'column' AND upstream_id = 'sales.raw.orders'
ORDER BY ALL;
Link
metastores 1 example17 cols

The Unity Catalog metastore this server or workspace serves.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
metastore_idnot null VARCHAR
Metastore id (UUID).
name VARCHAR
Metastore name (Databricks; NULL on open source).
cloud VARCHAR
Cloud of a Databricks metastore: aws, azure or gcp.
region VARCHAR
Cloud region of a Databricks metastore.
global_metastore_id VARCHAR
Delta Sharing identifier: <cloud>:<region>:<uuid>.
owner VARCHAR
Metastore admin (user or group).
storage_root VARCHAR
Default managed storage URL.
storage_root_credential_name VARCHAR
Storage credential used for the storage root.
delta_sharing_scope VARCHAR
INTERNAL or INTERNAL_AND_EXTERNAL.
delta_sharing_organization_name VARCHAR
Organization name shown to share recipients.
privilege_model_version VARCHAR
Privilege model version, e.g. '1.0'.
external_access_enabled BOOLEAN
Whether external engines may read via credential vending.
created_at TIMESTAMP WITH TIME ZONE
When the object was created.
created_by VARCHAR
Principal that created the object.
updated_at TIMESTAMP WITH TIME ZONE
When the object was last changed.
updated_by VARCHAR
Principal that last changed the object.
ConstraintsPRIMARY KEY (metastore_id)
Example

The metastore id and region

SELECT metastore_id, cloud, region FROM unity_catalog.main.metastores;
Link
model_versions 1 example16 cols

Versions of the models registered in Unity Catalog.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
model_idnot null VARCHAR
Full name of the model (registered_models.id).
catalog_namenot null VARCHAR
Catalog of the model.
schema_namenot null VARCHAR
Schema of the model.
model_namenot null VARCHAR
Short name of the registered model the version belongs to.
versionnot null BIGINT
Version number (1, 2, ...).
status VARCHAR
READY, PENDING_REGISTRATION or FAILED_REGISTRATION.
source VARCHAR
URI of the source artifacts (e.g. an MLflow run's artifact path).
run_id VARCHAR
MLflow run that produced the version.
storage_location VARCHAR
Storage URL of the version's artifacts.
description VARCHAR
Version comment.
uuid VARCHAR
Model version UUID (open source) when reported.
created_at TIMESTAMP WITH TIME ZONE
When the object was created.
created_by VARCHAR
Principal that created the object.
updated_at TIMESTAMP WITH TIME ZONE
When the object was last changed.
updated_by VARCHAR
Principal that last changed the object.
ConstraintsPRIMARY KEY (model_id, version) · FOREIGN KEY (model_id) REFERENCES registered_models(id)
Example

Latest ready version of each model

SELECT model_id, max(version) AS latest
FROM unity_catalog.main.model_versions
WHERE status = 'READY'
GROUP BY ALL
ORDER BY model_id;
Link
owners 1 example10 cols

The owner of every Unity Catalog object, in the shared data-catalog vocabulary.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
entity_idnot null VARCHAR
Full name of the owned object (its table's id column).
entity_typenot null VARCHAR
metastore, catalog, schema, dataset (table or view), volume, function, registered_model, external_location, storage_credential, connection, share or recipient.
entity_name VARCHAR
Short name of the owned object.
qualified_name VARCHAR
Lower-cased full name of the owned object.
owner_idnot null VARCHAR
Owner principal as Unity Catalog reports it.
owner_typenot null VARCHAR
'user', 'group' or 'service_principal' (inferred from the name).
owner_name VARCHAR
Owner principal.
owner_email VARCHAR
The owner when it is an email address.
ownership_type VARCHAR
Always 'OWNER': Unity Catalog has one owner per object.
ConstraintsPRIMARY KEY (entity_type, entity_id)
Example

Objects owned per principal

SELECT owner_id, entity_type, count(*) AS objects
FROM unity_catalog.main.owners
GROUP BY ALL
ORDER BY objects DESC;
Link
recipients 1 example14 cols

Delta Sharing recipients (Databricks); tokens are never read.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
idnot null VARCHAR
Recipient name.
namenot null VARCHAR
Recipient name.
authentication_type VARCHAR
DATABRICKS (Databricks-to-Databricks) or TOKEN (open).
activated BOOLEAN
Whether the recipient has activated its credential.
cloud VARCHAR
Cloud of a DATABRICKS recipient's metastore.
region VARCHAR
Region of a DATABRICKS recipient's metastore.
data_recipient_global_metastore_id VARCHAR
Global metastore id of a DATABRICKS recipient.
description VARCHAR
Comment.
owner VARCHAR
Owner principal.
created_at TIMESTAMP WITH TIME ZONE
When the object was created.
created_by VARCHAR
Principal that created the object.
updated_at TIMESTAMP WITH TIME ZONE
When the object was last changed.
updated_by VARCHAR
Principal that last changed the object.
ConstraintsPRIMARY KEY (id)
Example

Recipients that have not activated

SELECT name, authentication_type
FROM unity_catalog.main.recipients
WHERE NOT activated
ORDER BY name;
Link
registered_models 1 example18 cols

MLflow models registered in Unity Catalog.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
idnot null VARCHAR
Model full name, 'catalog.schema.model'.
platform VARCHAR
'databricks' for a Databricks workspace, 'unity_catalog' for open source.
catalog_namenot null VARCHAR
Catalog of the model.
schema_namenot null VARCHAR
Schema of the model.
namenot null VARCHAR
Model name.
qualified_name VARCHAR
Lower-cased 'catalog.schema.model'.
description VARCHAR
Model comment.
storage_location VARCHAR
Storage URL of the model's artifacts.
owner VARCHAR
Owner principal.
uuid VARCHAR
Model UUID (open source) when reported.
metastore_id VARCHAR
Metastore the model belongs to.
browse_only BOOLEAN
True when the principal can only browse it.
created_at TIMESTAMP WITH TIME ZONE
When the object was created.
created_by VARCHAR
Principal that created the object.
updated_at TIMESTAMP WITH TIME ZONE
When the object was last changed.
updated_by VARCHAR
Principal that last changed the object.
url VARCHAR
Catalog Explorer link (Databricks only).
ConstraintsPRIMARY KEY (id) · FOREIGN KEY (metastore_id) REFERENCES metastores(metastore_id)
Example

Registered models per catalog

SELECT catalog_name, count(*) AS models
FROM unity_catalog.main.registered_models
GROUP BY ALL
ORDER BY ALL;
Link
schemas 1 example20 cols

Unity Catalog schemas with owner, properties and storage root.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
idnot null VARCHAR
Schema full name, 'catalog.schema'.
platform VARCHAR
'databricks' for a Databricks workspace, 'unity_catalog' for open source.
catalog_namenot null VARCHAR
Parent catalog.
namenot null VARCHAR
Schema name.
qualified_name VARCHAR
Lower-cased 'catalog.schema'.
description VARCHAR
Schema comment.
owner VARCHAR
Owner principal.
properties MAP(VARCHAR, VARCHAR)
User-defined key/value properties.
storage_root VARCHAR
Managed storage root URL set on the schema.
storage_location VARCHAR
Effective managed storage location.
catalog_type VARCHAR
Databricks: type of the parent catalog.
browse_only BOOLEAN
True when the principal can only browse it.
metastore_id VARCHAR
Metastore the schema belongs to.
uuid VARCHAR
Schema UUID.
created_at TIMESTAMP WITH TIME ZONE
When the object was created.
created_by VARCHAR
Principal that created the object.
updated_at TIMESTAMP WITH TIME ZONE
When the object was last changed.
updated_by VARCHAR
Principal that last changed the object.
url VARCHAR
Catalog Explorer link (Databricks only).
ConstraintsPRIMARY KEY (id) · FOREIGN KEY (metastore_id) REFERENCES metastores(metastore_id)
Example

Schemas of one catalog (catalog_name is sent to the API)

SELECT name, owner, description
FROM unity_catalog.main.schemas
WHERE catalog_name = 'sales'
ORDER BY name;
Link
shares 1 example9 cols

Delta Sharing shares (Databricks), names only.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
idnot null VARCHAR
Share name.
namenot null VARCHAR
Share name.
description VARCHAR
Comment.
owner VARCHAR
Owner principal.
created_at TIMESTAMP WITH TIME ZONE
When the object was created.
created_by VARCHAR
Principal that created the object.
updated_at TIMESTAMP WITH TIME ZONE
When the object was last changed.
updated_by VARCHAR
Principal that last changed the object.
ConstraintsPRIMARY KEY (id)
Example

Delta Sharing shares and owners

SELECT name, owner, created_at FROM unity_catalog.main.shares ORDER BY name;
Link
storage_credentials 1 example15 cols

Storage credentials by name and kind; secret material is never read.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
idnot null VARCHAR
Storage credential name (unique in the metastore).
namenot null VARCHAR
Storage credential name.
credential_type VARCHAR
Kind of cloud identity: aws_iam_role, azure_managed_identity, azure_service_principal, databricks_gcp_service_account, cloudflare_api_token. The identity itself is never returned.
purpose VARCHAR
STORAGE (open source); NULL on Databricks.
read_only BOOLEAN
True when the credential only allows reads (Databricks).
used_for_managed_storage BOOLEAN
True when it backs managed storage (Databricks).
isolation_mode VARCHAR
OPEN or ISOLATED (Databricks).
description VARCHAR
Comment.
owner VARCHAR
Owner principal.
uuid VARCHAR
Credential UUID.
created_at TIMESTAMP WITH TIME ZONE
When the object was created.
created_by VARCHAR
Principal that created the object.
updated_at TIMESTAMP WITH TIME ZONE
When the object was last changed.
updated_by VARCHAR
Principal that last changed the object.
ConstraintsPRIMARY KEY (id)
Example

Storage credentials by kind

SELECT credential_type, count(*) AS credentials
FROM unity_catalog.main.storage_credentials
GROUP BY ALL
ORDER BY ALL;
Link
tag_assignments 1 example10 cols

Tags on catalogs, schemas, tables, columns and volumes (Databricks).

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
entity_typenot null VARCHAR
catalog, schema, table (tables and views), column or volume.
entity_idnot null VARCHAR
Full name of the tagged object; for a column, its table's full name (datasets.id).
column_name VARCHAR
Tagged column (entity_type 'column' only).
catalog_namenot null VARCHAR
Catalog of the tagged object.
tag_keynot null VARCHAR
Tag key (tags.id for governed tags).
tag_value VARCHAR
Tag value; NULL for a key-only tag.
source_type VARCHAR
How the tag was assigned, e.g. user-assigned or system-assigned.
updated_at TIMESTAMP WITH TIME ZONE
When the assignment last changed.
updated_by VARCHAR
Who last changed the assignment.
Example

Columns tagged as PII in one catalog

SELECT entity_id, column_name, tag_value
FROM unity_catalog.main.tag_assignments
WHERE entity_type = 'column' AND catalog_name = 'sales' AND tag_key = 'pii'
ORDER BY ALL;
Link
tags 1 example8 cols

Governed tag definitions (Databricks tag policies).

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
idnot null VARCHAR
Tag key (the governed tag's identifier in SQL and the UI).
namenot null VARCHAR
Tag key.
description VARCHAR
What the tag means and when to apply it.
allowed_values VARCHAR[]
Values the tag may take; empty when any value is allowed.
policy_id VARCHAR
Tag policy id.
created_at TIMESTAMP WITH TIME ZONE
When the tag policy was created.
updated_at TIMESTAMP WITH TIME ZONE
When the tag policy was last changed.
ConstraintsPRIMARY KEY (id)
Example

Governed tags and their allowed values

SELECT name, allowed_values FROM unity_catalog.main.tags ORDER BY name;
Link
views 1 example14 cols

Unity Catalog views with their SQL definition and dependencies.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
idnot null VARCHAR
View full name, 'catalog.schema.view' (datasets.id).
catalog_namenot null VARCHAR
Catalog of the view.
schema_namenot null VARCHAR
Schema of the view.
namenot null VARCHAR
View name.
qualified_name VARCHAR
Lower-cased 'catalog.schema.view'.
table_type VARCHAR
VIEW, MATERIALIZED_VIEW, METRIC_VIEW or STREAMING_TABLE.
view_definition VARCHAR
The view's SQL (YAML for metric views).
view_dependencies VARCHAR[]
Full names of the tables and functions the view reads.
description VARCHAR
View comment.
owner VARCHAR
Owner principal.
created_at TIMESTAMP WITH TIME ZONE
When the view was created.
updated_at TIMESTAMP WITH TIME ZONE
When the view was last changed.
url VARCHAR
Catalog Explorer link (Databricks only).
ConstraintsPRIMARY KEY (id)
Example

Views that read a given table

SELECT id
FROM unity_catalog.main.views
WHERE view_definition ILIKE '%sales.raw.orders%'
ORDER BY id;
Link
volumes 1 example19 cols

Unity Catalog volumes: governed directories of files.

Columns
catalog_toolnot null VARCHAR
Which catalog tool the row comes from: always 'unity_catalog' (vgi-datahub says 'datahub', vgi-openmetadata 'openmetadata'), for UNION ALL across catalogs.
idnot null VARCHAR
Volume full name, 'catalog.schema.volume'.
platform VARCHAR
'databricks' for a Databricks workspace, 'unity_catalog' for open source.
catalog_namenot null VARCHAR
Catalog of the volume.
schema_namenot null VARCHAR
Schema of the volume.
namenot null VARCHAR
Volume name.
qualified_name VARCHAR
Lower-cased 'catalog.schema.volume'.
description VARCHAR
Volume comment.
volume_type VARCHAR
MANAGED or EXTERNAL.
storage_location VARCHAR
Storage URL of the volume's files.
owner VARCHAR
Owner principal.
uuid VARCHAR
Volume UUID.
metastore_id VARCHAR
Metastore the volume belongs to.
browse_only BOOLEAN
True when the principal can only browse it.
created_at TIMESTAMP WITH TIME ZONE
When the object was created.
created_by VARCHAR
Principal that created the object.
updated_at TIMESTAMP WITH TIME ZONE
When the object was last changed.
updated_by VARCHAR
Principal that last changed the object.
url VARCHAR
Catalog Explorer link (Databricks only).
ConstraintsPRIMARY KEY (id) · FOREIGN KEY (metastore_id) REFERENCES metastores(metastore_id)
Example

External volumes and where their files live

SELECT id, storage_location
FROM unity_catalog.main.volumes
WHERE volume_type = 'EXTERNAL'
ORDER BY id;
Link
Scalar functions
uc_privilege (privilege VARCHAR) 2 examples

A Unity Catalog privilege in the canonical upper-case, underscore spelling

Arguments
privilege VARCHAR
A privilege name, e.g. 'USE CATALOG'; NULL gives NULL.
ReturnsVARCHAR
Examples (2)

Who can read which table, with the privilege typed as in a GRANT statement

SELECT securable_name, principal
FROM unity_catalog.main.grants
WHERE securable_type = 'table' AND privilege = unity_catalog.main.uc_privilege('select')
ORDER BY ALL;
SELECT unity_catalog.main.uc_privilege('USE CATALOG') AS use_catalog,
  unity_catalog.main.uc_privilege(' read volume ') AS read_volume;
Link
uc_qualified_name (name VARCHAR) 2 examples

The lower-cased catalog.schema.table join key of a Unity Catalog full name

Arguments
name VARCHAR
Object name to normalize, e.g. 'Sales.Raw.Orders'; NULL gives NULL.
ReturnsVARCHAR
Examples (2)

Look a table up by a name typed in any case

SELECT d.id, d.owner
FROM unity_catalog.main.datasets d
WHERE d.qualified_name = unity_catalog.main.uc_qualified_name('Sales.Raw.Orders');
SELECT unity_catalog.main.uc_qualified_name('Sales.RAW.Orders') AS plain,
  unity_catalog.main.uc_qualified_name('`sales`.`raw`.`daily revenue`') AS quoted;
Link

Credentials

The secret type unity_catalog declares, as reported by the worker itself.

unity_catalog

How to get these credentials

Connection to a Unity Catalog server: an open-source Unity Catalog server URL, or a Databricks workspace URL plus a personal access token, an OAuth service principal (client id + secret) or an Azure AD token.

secret.sql
CREATE SECRET unity_catalog (
    TYPE unity_catalog,
    host           '<host>',  -- required
    token          '<UNITY_CATALOG_TOKEN>',  -- secret
    client_id      '<client_id>',
    client_secret  '<UNITY_CATALOG_CLIENT_SECRET>',  -- secret
    azure_token    '<AZURE_TOKEN>',  -- secret
    auth_type      '<auth_type>',
    flavor         '<flavor>',
    include_browse '<include_browse>',
    page_size      '<page_size>',
    timeout        '<timeout>'
);
Key Type Required Description
host VARCHAR Yes Server URL: open-source Unity Catalog, e.g. 'http://localhost:8080', or a Databricks workspace, e.g. 'https://dbc-a1b2c3d4-e5f6.cloud.databricks.com'. A bare host name gets https://.
token secret VARCHAR No Bearer token: a Databricks personal access token (dapi...) or an open-source Unity Catalog token.
client_id VARCHAR No Databricks OAuth M2M: the service principal's application (client) id.
client_secret secret VARCHAR No Databricks OAuth M2M: the service principal's OAuth secret, exchanged at <host>/oidc/v1/token.
azure_token secret VARCHAR No An Azure AD (Entra ID) access token for the Azure Databricks resource.
auth_type VARCHAR No 'auto' (default: token, then client_id/client_secret, then azure_token, else no authentication), 'pat', 'oauth-m2m', 'azure' or 'none'.
flavor VARCHAR No 'auto' (default: Databricks for *.databricks.com / *.azuredatabricks.net hosts, else open source), 'databricks' or 'oss'. Sets the platform column and the UI links in the url column.
include_browse BOOLEAN No Databricks: also list catalogs, schemas and tables the principal can only browse (include_browse).
page_size BIGINT No Items requested per API page (max_results), capped at each endpoint's maximum.
timeout DOUBLE No Per-request timeout in seconds (default 30).

Create the secret in the same session, after attaching unity_catalog — the worker registers its secret types at ATTACH. Keys marked secret are masked in duckdb_secrets(); angle-bracket values are placeholders. Read credentials from your environment or secret store in your application and pass them through your SQL client’s parameter bindings. Keep real values out of saved SQL and history. Native DuckDB and Haybarn do not provide a SQL getenv() function.

Try these queries

The metastore id and region

SELECT metastore_id, cloud, region FROM unity_catalog.main.metastores

Uses metastores

Catalogs by type and owner

SELECT name, catalog_type, owner
FROM unity_catalog.main.catalogs
ORDER BY name

Uses catalogs

Schemas of one catalog (catalog_name is sent to the API)

SELECT name, owner, description
FROM unity_catalog.main.schemas
WHERE catalog_name = 'sales'
ORDER BY name

Uses schemas

Views that read a given table

SELECT id
FROM unity_catalog.main.views
WHERE view_definition ILIKE '%sales.raw.orders%'
ORDER BY id

Uses views

Partition columns of one table (fetched with one GET /tables call)

SELECT column_name, native_data_type, partition_index
FROM unity_catalog.main.columns
WHERE dataset_id = 'sales.raw.orders' AND partition_index IS NOT NULL
ORDER BY partition_index

Uses columns

External volumes and where their files live

SELECT id, storage_location
FROM unity_catalog.main.volumes
WHERE volume_type = 'EXTERNAL'
ORDER BY id

Uses volumes

22 more examples in the Catalog, each listed under the table or function it uses.

Questions it can answer

Plain-English questions from the worker's agent test tasks. An AI agent with this catalog attached should answer each one with SQL.

  • Using the unity_catalog worker, list the full names of the external tables in the sales catalog.
  • Which column(s) partition the table sales.raw.orders, and what is their data type?
  • Which principals have been granted SELECT on sales.raw.orders?
  • How many versions of the ml.models.churn model are in READY status?
  • Which Unity Catalog catalog has a 'team' property, and what is its value?
  • How many schemas does each catalog have?

Unity Catalog is an independent open-source connector from Query.Farm. It is not affiliated with, endorsed by or sponsored by the services, projects or organisations it works with. Product names, logos and trademarks belong to their respective owners.