ROW_FILTERS

![check marked yes](../../../_static/images/icons/check.png Databricks Runtime 12.2 and above ![check marked yes](../../../_static/images/icons/check.png Unity Catalog only.)

Important

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.

Name Data type Nullable Description
CATALOG_NAME STRING No Catalog that contains the table.
SCHEMA_NAME STRING No Schema that contains the table.
TABLE_NAME STRING No Name of the relation to which the row filter applies.
FILTER_CATALOG STRING No Catalog that contains the filter function.
FILTER_SCHEMA STRING No Schema that contains the filter function.
FILTER_NAME STRING No The specific name of the function implementing the filter.
FILTER_COL_USAGE STRING No A comma separated list of columns passed to the filter function. Empty if none.

Constraints

The following constraint applies to the ROW_FILTERS relation:

Class Name Column List Description
Primary key ROW_FILTERS_PK CATALOG_NAME, SCHEMA_NAME, TABLE_NAME Unique identifier for a row filter.
Foreign key ROW_FILTERS_TABLES_FK CATALOG_NAME, SCHEMA_NAME, TABLE_NAME References TABLES
Foreign key ROW_FILTERS_ROUTINES_FK FILTER_CATALOG, FILTER_SCHEMA, FILTER_NAME References ROUTINES

Example

-- 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;