Skip to content

OpenMetadata

OpenMetadata and Collate assets, ownership, glossary, lineage and data quality as SQL tables

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/openmetadata/index.md to help me query OpenMetadata 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.

Count tables by schema

Replace snowflake_prod with your OpenMetadata service name.

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

SELECT schema, count(*) AS tables
FROM openmetadata.main.datasets
WHERE service = 'snowflake_prod'
GROUP BY schema
ORDER BY tables DESC

Quick start

Choose where to run OpenMetadata, 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 'openmetadata' AS openmetadata (
  TYPE vgi,
  LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-openmetadata-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.

openmetadata credentials

Connection to an OpenMetadata server (open-source or Collate): HOST_PORT (the API root, e.g. 'http://localhost:8585/api') and a bot or personal-access JWT TOKEN.

Get these credentials β†’
secret.sql
CREATE SECRET openmetadata (
    TYPE openmetadata,
    host_port '<host_port>',
    token     '<OPENMETADATA_TOKEN>',  -- secret
    ui_url    '<ui_url>',
    page_size '<page_size>'
);
Credential fields and requirements β†’

4. Run a query

query.sql
SELECT schema, count(*) AS tables
FROM openmetadata.main.datasets
WHERE service = 'snowflake_prod'
GROUP BY schema
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 'openmetadata' AS openmetadata (
  TYPE vgi,
  LOCATION 'uvx --from git+https://github.com/Query-farm/[email protected] vgi-openmetadata-worker'
);

Overview

OpenMetadata and Collate metadata catalog (assets, governance, lineage, data quality) as SQL tables.

Catalog

Everything openmetadata exposes once attached β€” read straight from the worker's released build.

openmetadata 1 schema
main 27 tables Β· 5 functions

OpenMetadata assets, governance metadata, lineage, data quality, profiles and usage.

Schema examples (32)
Examples (32)

Tables per schema in one service (service pushes into the search query_filter)

SELECT schema, count(*) AS tables
FROM openmetadata.main.datasets
WHERE service = 'snowflake_prod'
GROUP BY schema
ORDER BY tables DESC;

Columns tagged PII.Sensitive

SELECT qualified_name, column_name
FROM openmetadata.main.columns
WHERE list_contains(tags, 'PII.Sensitive')
ORDER BY qualified_name, column_name;

Database services per platform

SELECT platform, count(*) AS services
FROM openmetadata.main.database_services
GROUP BY platform
ORDER BY services DESC;

Databases of one service (service pushes down)

SELECT name, owners
FROM openmetadata.main.databases
WHERE service = 'snowflake_prod'
ORDER BY name;
28 more examples

Schemas of one database (database_fqn pushes down)

SELECT name, description
FROM openmetadata.main.database_schemas
WHERE database_fqn = 'snowflake_prod.analytics'
ORDER BY name;

Dashboards of one BI service by chart count

SELECT display_name, len(charts) AS charts
FROM openmetadata.main.dashboards
WHERE service = 'looker_prod'
ORDER BY charts DESC;

Charts per chart type

SELECT chart_type, count(*) AS charts
FROM openmetadata.main.charts
GROUP BY chart_type
ORDER BY charts DESC;

Pipelines whose latest run failed

SELECT fqn, last_run_at
FROM openmetadata.main.pipelines
WHERE last_run_status = 'Failed'
ORDER BY last_run_at DESC;

Topics by partition count with retention in days

SELECT name, partitions, retention_ms / 86400000 AS retention_days
FROM openmetadata.main.topics
ORDER BY partitions DESC;

ML models with their algorithm and feature count

SELECT name, algorithm, len(features) AS features
FROM openmetadata.main.ml_models
ORDER BY name;

How many tables each user or team owns

SELECT owner_name, count(*) AS tables
FROM openmetadata.main.owners
WHERE entity_type = 'table'
GROUP BY owner_name
ORDER BY tables DESC;

Human users and their teams

SELECT username, teams
FROM openmetadata.main.users
WHERE NOT is_bot
ORDER BY username;

Teams by size

SELECT name, team_type, user_count
FROM openmetadata.main.teams
ORDER BY user_count DESC;

Classifications and how many tags each has

SELECT name, term_count
FROM openmetadata.main.classifications
ORDER BY name;

PII tags by how often they are applied

SELECT fqn, usage_count
FROM openmetadata.main.tags
WHERE classification = 'PII'
ORDER BY usage_count DESC;

Glossaries with their size and reviewers

SELECT name, term_count, reviewers
FROM openmetadata.main.glossaries
ORDER BY name;

Glossary terms still awaiting approval

SELECT fqn, status
FROM openmetadata.main.glossary_terms
WHERE status <> 'Approved'
ORDER BY fqn;

Tables per domain

SELECT d.fqn, count(t.id) AS tables
FROM openmetadata.main.domains d
LEFT JOIN openmetadata.main.datasets t ON t.domain = d.fqn
GROUP BY d.fqn
ORDER BY tables DESC;

Data products of the Sales domain by size

SELECT name, asset_count
FROM openmetadata.main.data_products
WHERE domain = 'Sales'
ORDER BY asset_count DESC;

Tables feeding one table directly (downstream_fqn pushes down)

SELECT upstream_qualified_name
FROM openmetadata.main.lineage_edges
WHERE downstream_fqn = 'snowflake_prod.analytics.marts.fct_orders' AND level = 'dataset'
ORDER BY upstream_qualified_name;

Tables with failing tests

SELECT qualified_name, failed, test_count
FROM openmetadata.main.test_suites
WHERE suite_type = 'basic' AND failed > 0
ORDER BY failed DESC;

Currently failing tests

SELECT qualified_name, name, last_result
FROM openmetadata.main.assertions
WHERE last_status = 'Failed'
ORDER BY qualified_name, name;

Failure counts per table since a date (run_at pushes down as startTs)

SELECT qualified_name,
  count(*) FILTER (WHERE status = 'Failed') AS failures, count(*) AS runs
FROM openmetadata.main.assertion_results
WHERE run_at >= TIMESTAMPTZ '2026-11-01 00:00:00+00'
GROUP BY qualified_name
ORDER BY failures DESC;

Open incidents, oldest first

SELECT qualified_name, test_case_fqn, assignee
FROM openmetadata.main.incidents
WHERE state <> 'Resolved'
ORDER BY updated_at;

Largest profiled tables in one service

SELECT qualified_name, row_count, size_bytes
FROM openmetadata.main.dataset_profiles
WHERE service = 'snowflake_prod'
ORDER BY size_bytes DESC
LIMIT 10;

The ten most-queried tables over the last month

SELECT qualified_name, monthly_query_count
FROM openmetadata.main.usage
ORDER BY monthly_query_count DESC
LIMIT 10;

Slowest queries touching one table

SELECT query, duration_ms
FROM openmetadata.main.queries
WHERE list_contains(used_in, 'snowflake_prod.analytics.marts.fct_orders')
ORDER BY duration_ms DESC
LIMIT 5;

Every table a table depends on, nearest first

SELECT DISTINCT upstream_qualified_name, degree
FROM openmetadata.main.lineage('snowflake_prod.analytics.marts.fct_orders', downstream_depth := 0)
WHERE level = 'dataset'
ORDER BY degree, upstream_qualified_name;

Tier 1 tables matching 'orders'

SELECT qualified_name, score
FROM openmetadata.main.search('orders', tier := 'Tier.Tier1')
ORDER BY score DESC;

Distinct sample values per non-PII column

SELECT column_name, count(DISTINCT value) AS distinct_values
FROM openmetadata.main.sample_data('snowflake_prod.analytics.marts.fct_orders')
GROUP BY column_name
ORDER BY column_name;

Most-consumed upstream tables by qualified name

SELECT openmetadata.main.fqn_qualified_name(upstream_fqn) AS source,
  count(*) AS consumers
FROM openmetadata.main.lineage_edges
WHERE level = 'dataset' AND upstream_type = 'table'
GROUP BY ALL
ORDER BY consumers DESC;

Test cases per database service

SELECT openmetadata.main.split_fqn(fqn)[1] AS service, count(*) AS tests
FROM openmetadata.main.assertions
GROUP BY ALL
ORDER BY tests DESC;
Tables
assertion_results 1 example16 cols

OpenMetadata test case results over time (run_at ranges push down)

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
assertion_idnot null VARCHAR
Id of the test case (assertions.id).
assertion_fqnnot null VARCHAR
FQN of the test case (assertions.fqn).
table_fqn VARCHAR
FQN of the tested table.
qualified_name VARCHAR
Lower-cased database.schema.table of the tested table.
column_name VARCHAR
Tested column, else NULL.
test_definition VARCHAR
Test definition name.
run_atnot null TIMESTAMP WITH TIME ZONE
When the result was recorded.
status VARCHAR
Success, Failed, Aborted or Queued.
result VARCHAR
Result message.
passed_rows BIGINT
Rows that passed (row-level tests).
failed_rows BIGINT
Rows that failed (row-level tests).
passed_rows_percentage DOUBLE
Percentage (0-100) of the tested rows that passed.
failed_rows_percentage DOUBLE
Percentage (0-100) of the tested rows that failed.
result_values MAP(VARCHAR, VARCHAR)
Measured values (name -> value), e.g. rowCount -> 1200.
incident_id VARCHAR
Incident opened for this result, if any.
Example

Failure counts per table since a date (run_at pushes down as startTs)

SELECT qualified_name,
  count(*) FILTER (WHERE status = 'Failed') AS failures, count(*) AS runs
FROM openmetadata.main.assertion_results
WHERE run_at >= TIMESTAMPTZ '2026-11-01 00:00:00+00'
GROUP BY qualified_name
ORDER BY failures DESC;
Link
assertions 2 examples25 cols

OpenMetadata test cases (assertions) with their latest result

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the test case.
fqnnot null VARCHAR
Fully-qualified name of the test case, e.g. 'snowflake_prod.analytics.marts.fct_orders.order_id.order_id_unique'.
namenot null VARCHAR
Test case name.
display_name VARCHAR
Human-readable name shown in the OpenMetadata UI (NULL when unset).
table_fqn VARCHAR
FQN of the tested table (datasets.fqn).
qualified_name VARCHAR
Lower-cased database.schema.table of the tested table.
column_name VARCHAR
Tested column for column-level tests, else NULL.
assertion_type VARCHAR
'table' or 'column'.
test_definition VARCHAR
Test definition, e.g. 'columnValuesToBeUnique', 'tableRowCountToBeBetween'.
description VARCHAR
Test case description.
parameters MAP(VARCHAR, VARCHAR)
Test parameters (name -> value).
test_suite_id VARCHAR
Id of the test suite (test_suites.id).
test_suite VARCHAR
FQN of the test suite.
last_status VARCHAR
Latest result: Success, Failed, Aborted or Queued; NULL if never run.
last_result VARCHAR
Latest result message.
last_run_at TIMESTAMP WITH TIME ZONE
When the latest result was recorded.
incident_id VARCHAR
Id of the open incident (incidents.id), if any.
owners VARCHAR[]
Owner names.
tags VARCHAR[]
Classification tag FQNs on the test case.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Examples (2)

Currently failing tests

SELECT qualified_name, name, last_result
FROM openmetadata.main.assertions
WHERE last_status = 'Failed'
ORDER BY qualified_name, name;

Test definitions used on one table (table_fqn pushes down as entityLink)

SELECT test_definition, count(*) AS tests
FROM openmetadata.main.assertions
WHERE table_fqn = 'snowflake_prod.analytics.marts.fct_orders'
GROUP BY test_definition
ORDER BY tests DESC;
Link
charts 1 example22 cols

OpenMetadata charts with type, dashboards, owners and tags

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the chart.
fqnnot null VARCHAR
Fully-qualified name of the chart (service.name), e.g. 'looker_prod.revenue_by_month'.
namenot null VARCHAR
Chart name (the source system's id or key).
display_name VARCHAR
Human-readable title shown in the OpenMetadata UI (NULL when unset).
service VARCHAR
Service name the asset was ingested from.
platform VARCHAR
Platform from the service type: 'looker', 'airflow', 'kafka', ...
description VARCHAR
Description (Markdown).
chart_type VARCHAR
Chart type: Line, Bar, Table, Pie, Area, Other, ...
dashboards VARCHAR[]
FQNs of the dashboards showing the chart.
owners VARCHAR[]
Owner names (users and teams); see the owners table for owner types.
tags VARCHAR[]
Classification tag FQNs, e.g. 'PII.Sensitive', 'Tier.Tier1'.
glossary_terms VARCHAR[]
Glossary term FQNs, e.g. 'Business.Revenue'.
tier VARCHAR
Tier tag FQN ('Tier.Tier1' .. 'Tier.Tier5'), NULL if untiered.
domain_id VARCHAR
Domain id (UUID).
domain VARCHAR
Domain fully-qualified name.
source_url VARCHAR
Link to the chart in its BI tool.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Charts per chart type

SELECT chart_type, count(*) AS charts
FROM openmetadata.main.charts
GROUP BY chart_type
ORDER BY charts DESC;
Link
classifications 1 example14 cols

OpenMetadata classifications (tag categories such as PII and Tier)

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the classification.
namenot null VARCHAR
Classification name, e.g. 'PII', 'Tier'.
display_name VARCHAR
Human-readable name shown in the OpenMetadata UI (NULL when unset).
description VARCHAR
Classification description.
mutually_exclusive BOOLEAN
True if an entity can carry only one tag of the classification.
term_count BIGINT
Number of tags in the classification.
provider VARCHAR
'system' (built in) or 'user'.
disabled BOOLEAN
True if the classification is disabled.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Classifications and how many tags each has

SELECT name, term_count
FROM openmetadata.main.classifications
ORDER BY name;
Link
columns 2 examples21 cols

Every column of every OpenMetadata table with type, constraint, tags and PII flag

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
dataset_idnot null VARCHAR
Id of the table (datasets.id).
table_fqnnot null VARCHAR
FQN of the table (datasets.fqn).
platform VARCHAR
Data platform of the table.
service VARCHAR
Database service name.
database VARCHAR
Database name.
schema VARCHAR
Schema name.
qualified_name VARCHAR
Lower-cased database.schema.table of the table.
column_namenot null VARCHAR
Column name; nested fields as dotted paths ('address.city').
fqn VARCHAR
Column FQN (table FQN + column name).
ordinal_positionnot null INTEGER
1-based position in the table (nested fields follow their parent).
data_type VARCHAR
OpenMetadata data type: VARCHAR, INT, BIGINT, TIMESTAMP, STRUCT, ARRAY, ...
native_data_type VARCHAR
The source's type as shown by OpenMetadata, e.g. 'varchar(256)'.
data_length INTEGER
Declared length in characters / bytes for sized types (varchar(256) -> 256).
nullablenot null BOOLEAN
False when the column is NOT NULL or part of the primary key.
column_constraint VARCHAR
Column constraint: NULL, NOT_NULL, UNIQUE or PRIMARY_KEY.
is_primary_keynot null BOOLEAN
True if the column is in the table's primary key.
description VARCHAR
Column description (Markdown).
tags VARCHAR[]
Classification tag FQNs on the column, e.g. 'PII.Sensitive'.
glossary_terms VARCHAR[]
Glossary term FQNs on the column.
is_piinot null BOOLEAN
True when the column carries any PII.* classification tag.
ConstraintsPRIMARY KEY (dataset_id, column_name)
Examples (2)

Columns tagged PII.Sensitive

SELECT qualified_name, column_name
FROM openmetadata.main.columns
WHERE list_contains(tags, 'PII.Sensitive')
ORDER BY qualified_name, column_name;

Schema of one table (table_fqn fetches only that table)

SELECT column_name, data_type, nullable
FROM openmetadata.main.columns
WHERE table_fqn = 'snowflake_prod.analytics.marts.fct_orders'
ORDER BY ordinal_position;
Link
dashboards 1 example22 cols

OpenMetadata dashboards with their charts, owners, tags, tier and domain

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the dashboard.
fqnnot null VARCHAR
Fully-qualified name of the dashboard (service.name), e.g. 'looker_prod.sales_overview'.
namenot null VARCHAR
Dashboard name (the source system's id or key).
display_name VARCHAR
Human-readable title shown in the OpenMetadata UI (NULL when unset).
service VARCHAR
Service name the asset was ingested from.
platform VARCHAR
Platform from the service type: 'looker', 'airflow', 'kafka', ...
description VARCHAR
Description (Markdown).
dashboard_type VARCHAR
Dashboard or Report.
charts VARCHAR[]
FQNs of the dashboard's charts.
owners VARCHAR[]
Owner names (users and teams); see the owners table for owner types.
tags VARCHAR[]
Classification tag FQNs, e.g. 'PII.Sensitive', 'Tier.Tier1'.
glossary_terms VARCHAR[]
Glossary term FQNs, e.g. 'Business.Revenue'.
tier VARCHAR
Tier tag FQN ('Tier.Tier1' .. 'Tier.Tier5'), NULL if untiered.
domain_id VARCHAR
Domain id (UUID).
domain VARCHAR
Domain fully-qualified name.
source_url VARCHAR
Link to the dashboard in its BI tool.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Dashboards of one BI service by chart count

SELECT display_name, len(charts) AS charts
FROM openmetadata.main.dashboards
WHERE service = 'looker_prod'
ORDER BY charts DESC;
Link
data_products 1 example17 cols

OpenMetadata data products with their domain and assets

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the data product.
fqnnot null VARCHAR
Fully-qualified name of the data product, e.g. 'Sales.Orders 360'.
namenot null VARCHAR
Data product name.
display_name VARCHAR
Human-readable name shown in the OpenMetadata UI (NULL when unset).
description VARCHAR
Data product description.
domain_id VARCHAR
Id of the owning domain.
domain VARCHAR
FQN of the owning domain.
assets VARCHAR[]
FQNs of the assets in the data product.
asset_count BIGINT
Number of assets in the data product.
owners VARCHAR[]
Owner names.
experts VARCHAR[]
Names of the data product's experts.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Data products of the Sales domain by size

SELECT name, asset_count
FROM openmetadata.main.data_products
WHERE domain = 'Sales'
ORDER BY asset_count DESC;
Link
database_schemas 1 example21 cols

OpenMetadata database schemas with their database, owners, tags and domain

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the schema.
fqnnot null VARCHAR
Fully-qualified name of the schema (service.database.schema), e.g. 'snowflake_prod.analytics.marts'.
namenot null VARCHAR
Schema name.
service VARCHAR
Database service name.
platform VARCHAR
Data platform from the service type.
database VARCHAR
Database name.
database_fqn VARCHAR
FQN of the database (databases.fqn).
description VARCHAR
Schema description.
owners VARCHAR[]
Owner names (users and teams); see the owners table for owner types.
tags VARCHAR[]
Classification tag FQNs, e.g. 'PII.Sensitive', 'Tier.Tier1'.
glossary_terms VARCHAR[]
Glossary term FQNs, e.g. 'Business.Revenue'.
tier VARCHAR
Tier tag FQN ('Tier.Tier1' .. 'Tier.Tier5'), NULL if untiered.
domain_id VARCHAR
Domain id (UUID).
domain VARCHAR
Domain fully-qualified name.
source_url VARCHAR
Link to the schema in its source system.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Schemas of one database (database_fqn pushes down)

SELECT name, description
FROM openmetadata.main.database_schemas
WHERE database_fqn = 'snowflake_prod.analytics'
ORDER BY name;
Link
database_services 1 example18 cols

OpenMetadata database services (connections); connection settings are never returned

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the database service.
fqnnot null VARCHAR
Fully-qualified name of the database service (its name), e.g. 'snowflake_prod'.
namenot null VARCHAR
Service name.
display_name VARCHAR
Human-readable name shown in the OpenMetadata UI (NULL when unset).
service_type VARCHAR
OpenMetadata serviceType: Snowflake, Postgres, BigQuery, ...
platform VARCHAR
Lower-case platform name derived from service_type.
description VARCHAR
Service description.
owners VARCHAR[]
Owner names (users and teams); see the owners table for owner types.
tags VARCHAR[]
Classification tag FQNs, e.g. 'PII.Sensitive', 'Tier.Tier1'.
glossary_terms VARCHAR[]
Glossary term FQNs, e.g. 'Business.Revenue'.
domain_id VARCHAR
Domain id (UUID).
domain VARCHAR
Domain fully-qualified name.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Database services per platform

SELECT platform, count(*) AS services
FROM openmetadata.main.database_services
GROUP BY platform
ORDER BY services DESC;
Link
databases 1 example19 cols

OpenMetadata databases with their service, owners, tags and domain

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the database.
fqnnot null VARCHAR
Fully-qualified name of the database (service.database), e.g. 'snowflake_prod.analytics'.
namenot null VARCHAR
Database name.
service VARCHAR
Database service name.
platform VARCHAR
Data platform from the service type.
description VARCHAR
Database description.
owners VARCHAR[]
Owner names (users and teams); see the owners table for owner types.
tags VARCHAR[]
Classification tag FQNs, e.g. 'PII.Sensitive', 'Tier.Tier1'.
glossary_terms VARCHAR[]
Glossary term FQNs, e.g. 'Business.Revenue'.
tier VARCHAR
Tier tag FQN ('Tier.Tier1' .. 'Tier.Tier5'), NULL if untiered.
domain_id VARCHAR
Domain id (UUID).
domain VARCHAR
Domain fully-qualified name.
source_url VARCHAR
Link to the database in its source system.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Databases of one service (service pushes down)

SELECT name, owners
FROM openmetadata.main.databases
WHERE service = 'snowflake_prod'
ORDER BY name;
Link
dataset_profiles 2 examples13 cols

Latest OpenMetadata profiler results per table, with per-column statistics

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
dataset_idnot null VARCHAR
Id of the table (datasets.id).
table_fqnnot null VARCHAR
FQN of the table (datasets.fqn).
platform VARCHAR
Data platform of the table.
service VARCHAR
Database service name.
database VARCHAR
Database name.
schema VARCHAR
Schema name.
qualified_name VARCHAR
Lower-cased database.schema.table of the table.
profiled_atnot null TIMESTAMP WITH TIME ZONE
When the profile was taken.
row_count BIGINT
Rows in the table.
column_count BIGINT
Columns in the table.
size_bytes BIGINT
Table size in bytes.
column_profiles STRUCT of 10 fields[]
Per-column statistics: STRUCT(column_name, null_count, null_proportion, unique_count, unique_proportion, min, max, mean, median, stdev); min..stdev as text.
STRUCT[] 10 fields
  • column_nameVARCHAR
  • null_countBIGINT
  • null_proportionDOUBLE
  • unique_countBIGINT
  • unique_proportionDOUBLE
  • minVARCHAR
  • maxVARCHAR
  • meanVARCHAR
  • medianVARCHAR
  • stdevVARCHAR
ConstraintsPRIMARY KEY (dataset_id)
Examples (2)

Largest profiled tables in one service

SELECT qualified_name, row_count, size_bytes
FROM openmetadata.main.dataset_profiles
WHERE service = 'snowflake_prod'
ORDER BY size_bytes DESC
LIMIT 10;

Mostly-NULL columns

SELECT p.qualified_name, c.column_name, c.null_proportion
FROM openmetadata.main.dataset_profiles p,
     unnest(p.column_profiles) AS u(c)
WHERE c.null_proportion > 0.5
ORDER BY c.null_proportion DESC;
Link
datasets 2 examples29 cols

Every OpenMetadata table with service, qualified name, owners, tags, tier and domain

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the table.
fqnnot null VARCHAR
Fully-qualified name of the table (service.database.schema.table), e.g. 'snowflake_prod.analytics.marts.fct_orders'.
platform VARCHAR
Data platform from the service type: 'snowflake', 'postgres', 'bigquery', ...
service VARCHAR
Database service name (the OpenMetadata connection), e.g. 'snowflake_prod'.
database VARCHAR
Database name.
schema VARCHAR
Schema name.
namenot null VARCHAR
Table name.
qualified_name VARCHAR
Lower-cased 'database.schema.table' (no service); the join key to dbt / OpenLineage and the other catalog workers.
database_fqn VARCHAR
FQN of the database (service.database).
schema_fqn VARCHAR
FQN of the schema (service.database.schema).
display_name VARCHAR
Human-readable name shown in the OpenMetadata UI (NULL when unset).
subtype VARCHAR
OpenMetadata tableType: Regular, View, MaterializedView, External, Dynamic, ...
description VARCHAR
Table description (Markdown).
owners VARCHAR[]
Owner names (users and teams); see the owners table for owner types.
tags VARCHAR[]
Classification tag FQNs, e.g. 'PII.Sensitive', 'Tier.Tier1'.
glossary_terms VARCHAR[]
Glossary term FQNs, e.g. 'Business.Revenue'.
tier VARCHAR
Tier tag FQN ('Tier.Tier1' .. 'Tier.Tier5'), NULL if untiered.
domain_id VARCHAR
Domain id (UUID).
domain VARCHAR
Domain fully-qualified name.
data_products VARCHAR[]
Data product FQNs the table belongs to.
column_count BIGINT
Number of top-level columns.
custom_properties MAP(VARCHAR, VARCHAR)
Custom property values (the entity's extension), as text.
source_url VARCHAR
Link to the table in its source system.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Examples (2)

Tables per schema in one service (service pushes into the search query_filter)

SELECT schema, count(*) AS tables
FROM openmetadata.main.datasets
WHERE service = 'snowflake_prod'
GROUP BY schema
ORDER BY tables DESC;

Tier 1 tables and their owners

SELECT qualified_name, owners
FROM openmetadata.main.datasets
WHERE tier = 'Tier.Tier1'
ORDER BY qualified_name;
Link
domains 1 example16 cols

OpenMetadata domains and subdomains with type, owners and experts

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the domain.
fqnnot null VARCHAR
Fully-qualified name of the domain (parent.child for subdomains), e.g. 'Sales'.
namenot null VARCHAR
Domain name.
display_name VARCHAR
Human-readable name shown in the OpenMetadata UI (NULL when unset).
description VARCHAR
Domain description.
domain_type VARCHAR
Aggregate, Consumer-aligned or Source-aligned.
parent_domain_id VARCHAR
Id of the parent domain, NULL for a top-level domain.
parent_domain VARCHAR
FQN of the parent domain.
owners VARCHAR[]
Owner names.
experts VARCHAR[]
Names of the domain's experts.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Tables per domain

SELECT d.fqn, count(t.id) AS tables
FROM openmetadata.main.domains d
LEFT JOIN openmetadata.main.datasets t ON t.domain = d.fqn
GROUP BY d.fqn
ORDER BY tables DESC;
Link
glossaries 1 example16 cols

OpenMetadata business glossaries with owners, reviewers and term counts

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the glossary.
namenot null VARCHAR
Glossary name.
display_name VARCHAR
Human-readable name shown in the OpenMetadata UI (NULL when unset).
description VARCHAR
Glossary description.
term_count BIGINT
Number of terms in the glossary.
mutually_exclusive BOOLEAN
True if an entity can carry only one term of the glossary.
owners VARCHAR[]
Owner names.
reviewers VARCHAR[]
Reviewer names.
tags VARCHAR[]
Classification tag FQNs on the glossary.
domain VARCHAR
Domain fully-qualified name.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Glossaries with their size and reviewers

SELECT name, term_count, reviewers
FROM openmetadata.main.glossaries
ORDER BY name;
Link
glossary_terms 1 example24 cols

OpenMetadata glossary terms with hierarchy, synonyms, related terms and status

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the glossary term.
fqnnot null VARCHAR
Fully-qualified name of the glossary term (glossary.parent.term), e.g. 'Business.Revenue.Net Revenue'.
namenot null VARCHAR
Term name.
display_name VARCHAR
Human-readable name shown in the OpenMetadata UI (NULL when unset).
glossary VARCHAR
Glossary name (glossaries.name).
glossary_id VARCHAR
Glossary id (glossaries.id).
parent_id VARCHAR
Id of the parent term, NULL for a top-level term.
parent_fqn VARCHAR
FQN of the parent term.
description VARCHAR
Term definition (Markdown).
synonyms VARCHAR[]
Alternative words that mean the same as the term.
related_terms VARCHAR[]
FQNs of related terms.
reference_links STRUCT("name" VARCHAR, endpoint VARCHAR)[]
External references: STRUCT(name, endpoint).
status VARCHAR
Approval status: Draft, In Review, Approved, Deprecated, Rejected.
owners VARCHAR[]
Owner names.
reviewers VARCHAR[]
Reviewer names.
tags VARCHAR[]
Classification tag FQNs on the term.
domain_id VARCHAR
Id (UUID) of the term's domain (domains.id).
domain VARCHAR
Domain fully-qualified name.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Glossary terms still awaiting approval

SELECT fqn, status
FROM openmetadata.main.glossary_terms
WHERE status <> 'Approved'
ORDER BY fqn;
Link
incidents 1 example16 cols

OpenMetadata data-quality incidents with their latest state (time ranges push down)

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
Incident id (the stateId shared by all status records of one incident).
status_id VARCHAR
Id of the latest status record.
test_case_id VARCHAR
Id of the failing test case (assertions.id).
test_case_fqn VARCHAR
FQN of the failing test case.
table_fqn VARCHAR
FQN of the affected table.
qualified_name VARCHAR
Lower-cased database.schema.table of the affected table.
state VARCHAR
Latest state: New, Ack, Assigned or Resolved.
severity VARCHAR
Severity1 (highest) .. Severity5, when set.
assignee VARCHAR
User the incident is assigned to.
resolved_by VARCHAR
User who resolved the incident.
failure_reason VARCHAR
Resolution reason: FalsePositive, MissingData, Duplicates, Other, ...
failure_comment VARCHAR
Resolution comment.
updated_at TIMESTAMP WITH TIME ZONE
When the latest status was recorded.
updated_by VARCHAR
Who recorded the latest status.
url VARCHAR
Link to the test case's incident page in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Open incidents, oldest first

SELECT qualified_name, test_case_fqn, assignee
FROM openmetadata.main.incidents
WHERE state <> 'Resolved'
ORDER BY updated_at;
Link
lineage_edges 2 examples20 cols

Direct table- and column-level lineage edges recorded in OpenMetadata

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
levelnot null VARCHAR
'dataset' for an entity-to-entity edge, 'column' for a column-to-column edge.
upstream_idnot null VARCHAR
Id of the upstream entity.
upstream_type VARCHAR
Entity type of the upstream end: table, dashboard, pipeline, topic, ...
upstream_fqn VARCHAR
FQN of the upstream entity.
upstream_name VARCHAR
Name of the upstream entity.
upstream_qualified_name VARCHAR
Lower-cased database.schema.table when the upstream is a table.
upstream_column VARCHAR
Upstream column name (column-level edges), else NULL.
downstream_idnot null VARCHAR
Id of the downstream entity.
downstream_type VARCHAR
Entity type of the downstream end: table, dashboard, pipeline, topic, ...
downstream_fqn VARCHAR
FQN of the downstream entity.
downstream_name VARCHAR
Name of the downstream entity.
downstream_qualified_name VARCHAR
Lower-cased database.schema.table when the downstream is a table.
downstream_column VARCHAR
Downstream column name (column-level edges), else NULL.
pipeline_fqn VARCHAR
FQN of the pipeline that produces the edge, when recorded.
transformation VARCHAR
Column-level transformation expression (columnsLineage.function).
sql_query VARCHAR
SQL that created the edge (query-log lineage), when recorded.
lineage_source VARCHAR
How the edge was found: Manual, QueryLineage, DbtLineage, ViewLineage, ...
created_at TIMESTAMP WITH TIME ZONE
When the edge was recorded.
updated_at TIMESTAMP WITH TIME ZONE
When the edge was last updated.
Examples (2)

Tables feeding one table directly (downstream_fqn pushes down)

SELECT upstream_qualified_name
FROM openmetadata.main.lineage_edges
WHERE downstream_fqn = 'snowflake_prod.analytics.marts.fct_orders' AND level = 'dataset'
ORDER BY upstream_qualified_name;

Column-level lineage into one table

SELECT upstream_column, downstream_column, transformation
FROM openmetadata.main.lineage_edges
WHERE downstream_fqn = 'snowflake_prod.analytics.marts.fct_orders' AND level = 'column'
ORDER BY downstream_column;
Link
ml_models 1 example25 cols

OpenMetadata ML models with algorithm, target, features, owners and tags

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the ML model.
fqnnot null VARCHAR
Fully-qualified name of the ML model (service.name), e.g. 'mlflow_prod.churn_model'.
namenot null VARCHAR
Ml model name (the source system's id or key).
display_name VARCHAR
Human-readable title shown in the OpenMetadata UI (NULL when unset).
service VARCHAR
Service name the asset was ingested from.
platform VARCHAR
Platform from the service type: 'looker', 'airflow', 'kafka', ...
description VARCHAR
Description (Markdown).
algorithm VARCHAR
Algorithm, e.g. 'XGBoost'.
target VARCHAR
Target (label) variable.
features VARCHAR[]
Feature names.
server VARCHAR
Serving endpoint URL.
dashboard VARCHAR
FQN of the dashboard monitoring the model.
owners VARCHAR[]
Owner names (users and teams); see the owners table for owner types.
tags VARCHAR[]
Classification tag FQNs, e.g. 'PII.Sensitive', 'Tier.Tier1'.
glossary_terms VARCHAR[]
Glossary term FQNs, e.g. 'Business.Revenue'.
tier VARCHAR
Tier tag FQN ('Tier.Tier1' .. 'Tier.Tier5'), NULL if untiered.
domain_id VARCHAR
Domain id (UUID).
domain VARCHAR
Domain fully-qualified name.
source_url VARCHAR
Link to the model in its registry.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

ML models with their algorithm and feature count

SELECT name, algorithm, len(features) AS features
FROM openmetadata.main.ml_models
ORDER BY name;
Link
owners 1 example10 cols

One row per (entity, owner) across OpenMetadata data assets

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
entity_idnot null VARCHAR
Id of the owned entity (datasets.id, dashboards.id, ...).
entity_typenot null VARCHAR
Owned entity type: table, database, databaseSchema, databaseService, dashboard, chart, pipeline, topic, mlmodel.
entity_fqn VARCHAR
FQN of the owned entity.
entity_name VARCHAR
Name of the owned entity.
qualified_name VARCHAR
Lower-cased database.schema.table when the entity is a table.
owner_idnot null VARCHAR
Id of the owner (users.id or teams.id).
owner_typenot null VARCHAR
'user' or 'team'.
owner_name VARCHAR
Owner's name (user name or team name).
owner_display_name VARCHAR
Owner's display name.
ConstraintsPRIMARY KEY (entity_id, owner_id)
Example

How many tables each user or team owns

SELECT owner_name, count(*) AS tables
FROM openmetadata.main.owners
WHERE entity_type = 'table'
GROUP BY owner_name
ORDER BY tables DESC;
Link
pipelines 1 example24 cols

OpenMetadata pipelines with tasks, latest run status, owners and tags

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the pipeline.
fqnnot null VARCHAR
Fully-qualified name of the pipeline (service.name), e.g. 'airflow_prod.daily_orders'.
namenot null VARCHAR
Pipeline name (the source system's id or key).
display_name VARCHAR
Human-readable title shown in the OpenMetadata UI (NULL when unset).
service VARCHAR
Service name the asset was ingested from.
platform VARCHAR
Platform from the service type: 'looker', 'airflow', 'kafka', ...
description VARCHAR
Description (Markdown).
tasks STRUCT of 4 fields[]
Tasks: name, display_name, task_type and downstream task names.
STRUCT[] 4 fields
  • nameVARCHAR
  • display_nameVARCHAR
  • task_typeVARCHAR
  • downstream_tasksVARCHAR[]
schedule_interval VARCHAR
Schedule (cron or preset) reported by the orchestrator.
last_run_status VARCHAR
Status of the latest run: Successful, Failed, Pending, Skipped.
last_run_at TIMESTAMP WITH TIME ZONE
When the latest reported run happened.
owners VARCHAR[]
Owner names (users and teams); see the owners table for owner types.
tags VARCHAR[]
Classification tag FQNs, e.g. 'PII.Sensitive', 'Tier.Tier1'.
glossary_terms VARCHAR[]
Glossary term FQNs, e.g. 'Business.Revenue'.
tier VARCHAR
Tier tag FQN ('Tier.Tier1' .. 'Tier.Tier5'), NULL if untiered.
domain_id VARCHAR
Domain id (UUID).
domain VARCHAR
Domain fully-qualified name.
source_url VARCHAR
Link to the pipeline in its orchestrator.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Pipelines whose latest run failed

SELECT fqn, last_run_at
FROM openmetadata.main.pipelines
WHERE last_run_status = 'Failed'
ORDER BY last_run_at DESC;
Link
queries 1 example19 cols

OpenMetadata query entities (from query logs or curated) with the tables they use

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the query.
fqnnot null VARCHAR
Fully-qualified name of the query, e.g. 'snowflake_prod.3f1c9a...'.
namenot null VARCHAR
Query name (a checksum unless named).
query VARCHAR
SQL text.
query_date TIMESTAMP WITH TIME ZONE
When the query ran (query-log queries).
duration_ms DOUBLE
How long the query ran, in milliseconds.
service VARCHAR
Database service the query ran on.
users VARCHAR[]
OpenMetadata users who ran the query.
used_by VARCHAR[]
Raw user names from the query log.
used_in VARCHAR[]
FQNs of the tables the query uses.
checksum VARCHAR
Checksum of the SQL text.
owners VARCHAR[]
Owner names.
tags VARCHAR[]
Classification tag FQNs on the query.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Slowest queries touching one table

SELECT query, duration_ms
FROM openmetadata.main.queries
WHERE list_contains(used_in, 'snowflake_prod.analytics.marts.fct_orders')
ORDER BY duration_ms DESC
LIMIT 5;
Link
tags 1 example16 cols

OpenMetadata classification tags with usage counts

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the tag.
fqnnot null VARCHAR
Fully-qualified name of the tag (classification.tag), e.g. 'PII.Sensitive'.
namenot null VARCHAR
Tag name within its classification.
classification VARCHAR
Classification name (classifications.name).
display_name VARCHAR
Human-readable name shown in the OpenMetadata UI (NULL when unset).
description VARCHAR
Tag description.
color VARCHAR
Display color (hex), when set.
usage_count BIGINT
Number of entities and columns carrying the tag.
provider VARCHAR
'system' (built in) or 'user'.
disabled BOOLEAN
True if the tag is disabled.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

PII tags by how often they are applied

SELECT fqn, usage_count
FROM openmetadata.main.tags
WHERE classification = 'PII'
ORDER BY usage_count DESC;
Link
teams 1 example16 cols

OpenMetadata teams with type, parents, owners and member count

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the team.
namenot null VARCHAR
Team name.
display_name VARCHAR
Human-readable name shown in the OpenMetadata UI (NULL when unset).
description VARCHAR
Team description.
team_type VARCHAR
Organization, BusinessUnit, Division, Department or Group.
email VARCHAR
Team email address.
parents VARCHAR[]
Names of the parent teams.
owners VARCHAR[]
Owner names of the team.
user_count BIGINT
Number of users in the team.
is_joinable BOOLEAN
True if users can join the team themselves.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Teams by size

SELECT name, team_type, user_count
FROM openmetadata.main.teams
ORDER BY user_count DESC;
Link
test_suites 1 example20 cols

OpenMetadata data-quality test suites with their latest result summary

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the test suite.
fqnnot null VARCHAR
Fully-qualified name of the test suite, e.g. 'snowflake_prod.analytics.marts.fct_orders.testSuite'.
namenot null VARCHAR
Test suite name.
display_name VARCHAR
Human-readable name shown in the OpenMetadata UI (NULL when unset).
description VARCHAR
Test suite description.
suite_type VARCHAR
'basic' (the table's own suite) or 'logical' (a user-defined grouping).
table_fqn VARCHAR
FQN of the table a basic suite belongs to.
qualified_name VARCHAR
Lower-cased database.schema.table of that table.
test_count BIGINT
Number of test cases in the suite.
success BIGINT
Count of test cases whose latest result is Success.
failed BIGINT
Count of test cases whose latest result is Failed.
aborted BIGINT
Count of test cases whose latest result is Aborted.
queued BIGINT
Count of test cases whose latest result is Queued.
owners VARCHAR[]
Owner names.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Tables with failing tests

SELECT qualified_name, failed, test_count
FROM openmetadata.main.test_suites
WHERE suite_type = 'basic' AND failed > 0
ORDER BY failed DESC;
Link
topics 1 example26 cols

OpenMetadata messaging topics with partitions, retention, owners and tags

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the topic.
fqnnot null VARCHAR
Fully-qualified name of the topic (service.name), e.g. 'kafka_prod.orders.events'.
namenot null VARCHAR
Topic name (the source system's id or key).
display_name VARCHAR
Human-readable title shown in the OpenMetadata UI (NULL when unset).
service VARCHAR
Service name the asset was ingested from.
platform VARCHAR
Platform from the service type: 'looker', 'airflow', 'kafka', ...
description VARCHAR
Description (Markdown).
partitions INTEGER
Number of partitions.
replication_factor INTEGER
Number of broker replicas kept of each partition.
retention_ms BIGINT
Retention time in milliseconds (-1 = forever).
max_message_size BIGINT
Maximum message size in bytes.
cleanup_policies VARCHAR[]
Cleanup policies: delete, compact.
schema_type VARCHAR
Message schema type: Avro, Protobuf, JSON, None.
owners VARCHAR[]
Owner names (users and teams); see the owners table for owner types.
tags VARCHAR[]
Classification tag FQNs, e.g. 'PII.Sensitive', 'Tier.Tier1'.
glossary_terms VARCHAR[]
Glossary term FQNs, e.g. 'Business.Revenue'.
tier VARCHAR
Tier tag FQN ('Tier.Tier1' .. 'Tier.Tier5'), NULL if untiered.
domain_id VARCHAR
Domain id (UUID).
domain VARCHAR
Domain fully-qualified name.
source_url VARCHAR
Link to the topic in its broker UI.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Topics by partition count with retention in days

SELECT name, partitions, retention_ms / 86400000 AS retention_days
FROM openmetadata.main.topics
ORDER BY partitions DESC;
Link
usage 2 examples16 cols

OpenMetadata table usage: daily query counts and percentile ranks

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
dataset_idnot null VARCHAR
Id of the table (datasets.id).
table_fqnnot null VARCHAR
FQN of the table (datasets.fqn).
platform VARCHAR
Data platform of the table.
service VARCHAR
Database service name.
database VARCHAR
Database name.
schema VARCHAR
Schema name.
qualified_name VARCHAR
Lower-cased database.schema.table of the table.
usage_datenot null DATE
Day the counts are for.
time_rangenot null VARCHAR
Granularity of query_count: always 'DAY'.
query_count BIGINT
Count of queries that used the table on usage_date.
percentile_rank DOUBLE
Percentile (0-100) of the table's daily query count among all tables.
weekly_query_count BIGINT
Count of queries in the 7 days ending on usage_date.
weekly_percentile_rank DOUBLE
Percentile (0-100) of the table's 7-day query count among all tables.
monthly_query_count BIGINT
Count of queries in the 30 days ending on usage_date.
monthly_percentile_rank DOUBLE
Percentile (0-100) of the table's 30-day query count among all tables.
ConstraintsPRIMARY KEY (dataset_id, usage_date)
Examples (2)

The ten most-queried tables over the last month

SELECT qualified_name, monthly_query_count
FROM openmetadata.main.usage
ORDER BY monthly_query_count DESC
LIMIT 10;

Daily usage history of one table

SELECT usage_date, query_count
FROM openmetadata.main.usage
WHERE table_fqn = 'snowflake_prod.analytics.marts.fct_orders'
ORDER BY usage_date;
Link
users 1 example14 cols

OpenMetadata users and bots with their teams and roles

Columns
catalog_toolnot null VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
idnot null VARCHAR
OpenMetadata id (UUID) of the user.
usernamenot null VARCHAR
Login name (the user's OpenMetadata name).
display_name VARCHAR
Human-readable name shown in the OpenMetadata UI (NULL when unset).
email VARCHAR
Email address.
is_admin BOOLEAN
True for OpenMetadata administrators.
is_bot BOOLEAN
True for bot users (ingestion and automation identities).
teams VARCHAR[]
Names of the teams the user belongs to.
roles VARCHAR[]
Names of the roles assigned directly to the user.
deletednot null BOOLEAN
True for a soft-deleted entity (only returned when fetched by id / fqn).
updated_at TIMESTAMP WITH TIME ZONE
When the entity was last changed in OpenMetadata.
updated_by VARCHAR
Who last changed the entity in OpenMetadata.
version DOUBLE
OpenMetadata entity version (0.1, 0.2, ... minor; 1.0 ... major).
url VARCHAR
Link to the entity in the OpenMetadata UI.
ConstraintsPRIMARY KEY (id)
Example

Human users and their teams

SELECT username, teams
FROM openmetadata.main.users
WHERE NOT is_bot
ORDER BY username;
Link
Scalar functions
fqn_qualified_name (fqn VARCHAR) 2 examples

The lower-cased database.schema.table join key of an OpenMetadata table FQN

Arguments
fqn VARCHAR
An OpenMetadata fully-qualified name (datasets.fqn, lineage_edges.upstream_fqn, ...); NULL gives NULL.
ReturnsVARCHAR
Examples (2)

Most-consumed upstream tables by qualified name

SELECT openmetadata.main.fqn_qualified_name(upstream_fqn) AS source,
  count(*) AS consumers
FROM openmetadata.main.lineage_edges
WHERE level = 'dataset' AND upstream_type = 'table'
GROUP BY ALL
ORDER BY consumers DESC;
SELECT openmetadata.main.fqn_qualified_name('snowflake_prod.ANALYTICS.Marts.FCT_ORDERS') AS table_key,
  openmetadata.main.fqn_qualified_name('snowflake_prod.analytics.marts.fct_orders.order_id') AS column_key,
  openmetadata.main.fqn_qualified_name('snowflake_prod."my.db".Marts.FCT_ORDERS') AS quoted_key;
Link
split_fqn (fqn VARCHAR) 2 examples

Split an OpenMetadata FQN into its parts, honouring double-quoted names

Arguments
fqn VARCHAR
An OpenMetadata fully-qualified name (datasets.fqn, lineage_edges.upstream_fqn, ...); NULL gives NULL.
ReturnsVARCHAR[]
Examples (2)

Test cases per database service

SELECT openmetadata.main.split_fqn(fqn)[1] AS service, count(*) AS tests
FROM openmetadata.main.assertions
GROUP BY ALL
ORDER BY tests DESC;
SELECT p[1] AS service, p[4] AS table_name, len(q) AS parts,
  q[2] AS quoted_part
FROM (SELECT openmetadata.main.split_fqn('snowflake_prod.analytics.marts.fct_orders') AS p, openmetadata.main.split_fqn('snowflake_prod."my.db".Marts.FCT_ORDERS') AS q);
Link
Table functions
lineage (fqn VARCHAR, downstream_depth := BIGINT, entity_type := VARCHAR, upstream_depth := BIGINT) 2 examples

Multi-hop upstream and downstream lineage edges of one entity (impact analysis)

Positional arguments
fqn VARCHAR
FQN of the start entity, e.g. 'snowflake_prod.analytics.marts.fct_orders'.
Named arguments
downstream_depth := BIGINT
Hops to follow downstream (impact); 0 to 10. Β· default 3
entity_type := VARCHAR
Entity type of the start entity. Β· default "table"
upstream_depth := BIGINT
Hops to follow upstream (dependencies); 0 to 10. Β· default 3
Returns columns
catalog_tool VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
start_fqn VARCHAR
FQN of the start entity (the fqn argument).
direction VARCHAR
'upstream' or 'downstream' of the start entity.
degree INTEGER
Hops from the start entity to the edge's far end (1 = direct).
level VARCHAR
'dataset' for an entity-to-entity edge, 'column' for a column-to-column edge.
upstream_id VARCHAR
Id of the upstream entity.
upstream_type VARCHAR
Entity type of the upstream end: table, dashboard, pipeline, topic, ...
upstream_fqn VARCHAR
FQN of the upstream entity.
upstream_name VARCHAR
Name of the upstream entity.
upstream_qualified_name VARCHAR
Lower-cased database.schema.table when the upstream is a table.
upstream_column VARCHAR
Upstream column name (column-level edges), else NULL.
downstream_id VARCHAR
Id of the downstream entity.
downstream_type VARCHAR
Entity type of the downstream end: table, dashboard, pipeline, topic, ...
downstream_fqn VARCHAR
FQN of the downstream entity.
downstream_name VARCHAR
Name of the downstream entity.
downstream_qualified_name VARCHAR
Lower-cased database.schema.table when the downstream is a table.
downstream_column VARCHAR
Downstream column name (column-level edges), else NULL.
pipeline_fqn VARCHAR
FQN of the pipeline that produces the edge, when recorded.
transformation VARCHAR
Column-level transformation expression (columnsLineage.function).
sql_query VARCHAR
SQL that created the edge (query-log lineage), when recorded.
lineage_source VARCHAR
How the edge was found: Manual, QueryLineage, DbtLineage, ViewLineage, ...
created_at TIMESTAMP WITH TIME ZONE
When the edge was recorded.
updated_at TIMESTAMP WITH TIME ZONE
When the edge was last updated.
Examples (2)

Every table a table depends on, nearest first

SELECT DISTINCT upstream_qualified_name, degree
FROM openmetadata.main.lineage('snowflake_prod.analytics.marts.fct_orders', downstream_depth := 0)
WHERE level = 'dataset'
ORDER BY degree, upstream_qualified_name;

Dashboards affected by a change to a raw table

SELECT DISTINCT downstream_type, downstream_fqn
FROM openmetadata.main.lineage('snowflake_prod.analytics.raw.orders', upstream_depth := 0, downstream_depth := 5)
WHERE downstream_type = 'dashboard'
ORDER BY downstream_fqn;
Link
sample_data (fqn VARCHAR, max_rows := BIGINT) 1 example

Opt-in sample rows of one table as (row, column, value); PII-tagged columns are never returned

Positional arguments
fqn VARCHAR
Table FQN, e.g. 'snowflake_prod.analytics.marts.fct_orders'.
Named arguments
max_rows := BIGINT
Maximum sample rows; 1 to 10000. Β· default 100
Returns columns
catalog_tool VARCHAR
Catalog that produced the row; always 'openmetadata' (UNION key with the other catalog workers).
table_fqn VARCHAR
FQN of the sampled table.
row_number INTEGER
1-based number of the sample row.
column_name VARCHAR
Column name.
value VARCHAR
The sample value as text (NULL for NULL).
Example

Distinct sample values per non-PII column

SELECT column_name, count(DISTINCT value) AS distinct_values
FROM openmetadata.main.sample_data('snowflake_prod.analytics.marts.fct_orders')
GROUP BY column_name
ORDER BY column_name;
Link

Credentials

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

openmetadata

How to get these credentials

Connection to an OpenMetadata server (open-source or Collate): HOST_PORT (the API root, e.g. 'http://localhost:8585/api') and a bot or personal-access JWT TOKEN.

secret.sql
CREATE SECRET openmetadata (
    TYPE openmetadata,
    host_port '<host_port>',
    token     '<OPENMETADATA_TOKEN>',  -- secret
    ui_url    '<ui_url>',
    page_size '<page_size>'
);
Key Type Required Description
host_port VARCHAR β€” OpenMetadata API root, e.g. 'http://localhost:8585/api' or 'https://<tenant>.getcollate.io/api'. '/api' is appended when missing; requests go to <host_port>/v1/...
token secret VARCHAR β€” JWT of an OpenMetadata bot (Settings > Bots) or a personal access token, sent as 'Authorization: Bearer <token>'. Leave unset only for a server with authentication disabled.
ui_url VARCHAR β€” OpenMetadata UI root for row links (url column); default: HOST_PORT without /api.
page_size VARCHAR β€” Entities requested per list / search page; 1 to 1000, default 100.

The worker doesn't mark which keys are required.

Needed by lineagesearchsample_data

Create the secret in the same session, after attaching openmetadata β€” 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

Columns tagged PII.Sensitive

SELECT qualified_name, column_name
FROM openmetadata.main.columns
WHERE list_contains(tags, 'PII.Sensitive')
ORDER BY qualified_name, column_name

Uses columns

Database services per platform

SELECT platform, count(*) AS services
FROM openmetadata.main.database_services
GROUP BY platform
ORDER BY services DESC

Uses database_services

Databases of one service (service pushes down)

SELECT name, owners
FROM openmetadata.main.databases
WHERE service = 'snowflake_prod'
ORDER BY name

Uses databases

Schemas of one database (database_fqn pushes down)

SELECT name, description
FROM openmetadata.main.database_schemas
WHERE database_fqn = 'snowflake_prod.analytics'
ORDER BY name

Uses database_schemas

Dashboards of one BI service by chart count

SELECT display_name, len(charts) AS charts
FROM openmetadata.main.dashboards
WHERE service = 'looker_prod'
ORDER BY charts DESC

Uses dashboards

Charts per chart type

SELECT chart_type, count(*) AS charts
FROM openmetadata.main.charts
GROUP BY chart_type
ORDER BY charts DESC

Uses charts

35 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 openmetadata worker, list the qualified names of every Tier 1 table, alphabetically.
  • Using the openmetadata worker, which columns (table qualified name and column name) are tagged PII.Sensitive?
  • Using the openmetadata worker, which data-quality test cases are currently failing, and on which tables?
  • Using the openmetadata worker, which tables feed directly into the fct_orders table?
  • For each OpenMetadata database service, how many databases and how many database schemas does it have?
  • Which charts are on the Sales Overview dashboard in OpenMetadata, and what chart type is each?

OpenMetadata 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.