Skip to main content

ROW_FILTERS

check marked yes Databricks Runtime 12.2 LTS and above check marked yes Unity Catalog only.

Preview

This feature is in Public Preview.

INFORMATION_SCHEMA.ROW_FILTERS contains the row filter metadata for relations in the catalog, or all catalogs if owned by the SYSTEM catalog.

Information is displayed only for relation the user has permission to interact with.

This relation is an extension to the SQL Standard Information Schema.

Definition

The ROW_FILTERS relation contains the following.

NameData typeNullableDescription
CATALOG_NAMESTRINGNoCatalog that contains the table.
SCHEMA_NAMESTRINGNoSchema that contains the table.
TABLE_NAMESTRINGNoName of the relation to which the row filter applies.
FILTER_CATALOGSTRINGNoCatalog that contains the filter function.
FILTER_SCHEMASTRINGNoSchema that contains the filter function.
FILTER_NAMESTRINGNoThe specific name of the function implementing the filter.
FILTER_COL_USAGESTRINGNoA comma separated list of columns passed to the filter function. Empty if none.

Constraints

The following constraint applies to the ROW_FILTERS relation:

ClassNameColumn ListDescription
Primary keyROW_FILTERS_PKCATALOG_NAME, SCHEMA_NAME, TABLE_NAMEUnique identifier for a row filter.
Foreign keyROW_FILTERS_TABLES_FKCATALOG_NAME, SCHEMA_NAME, TABLE_NAMEReferences TABLES
Foreign keyROW_FILTERS_ROUTINES_FKFILTER_CATALOG, FILTER_SCHEMA, FILTER_NAMEReferences ROUTINES

Example

SQL
-- Return the names of all functions used as row filters in the current catalog.
> SELECT filter_catalog, filter_schema, filter_name, count(1)
FROM information_schema.row_filters
GROUP BY ALL
ORDER BY ALL;