System rule templates list
Stay organized with collections
Save and categorize content based on your preferences.
Knowledge Catalog (formerly Dataplex Universal Catalog) supports a range of rule templates that you can use to define and automate data quality and data validation processes. Implementing these templates is a key part of data governance, ensuring that datasets remain accurate and consistent.
To identify which of these templates to use, you can perform data profiling on your resources to identify potential quality issues. After identifying the required quality checks, you can select the appropriate templates from this page to define rules for your resources.
This page lists the available system rule templates that you can use in any region.
Table shape
| Name |
Description |
| Column Count Equality Expectation |
Aggregate rule that evaluates whether the number of columns in the table equals a specified value. This rule requires bigquery.tables.get, bigquery.tables.list, and bigquery.datasets.get permissions on the table and dataset being queried. |
| Column Count Range Expectation |
Aggregate rule that evaluates whether the number of columns in the table lies within a specified range. This rule requires bigquery.tables.get, bigquery.tables.list, and bigquery.datasets.get permissions on the table and dataset being queried. |
| Column Existence Expectation |
Aggregate rule that evaluates whether a specific column exists in the table. This rule requires bigquery.tables.get, bigquery.tables.list, and bigquery.datasets.get permissions on the table and dataset being queried. |
| Freshness Expectation |
Aggregate rule that evaluates whether the latest data in a column is newer than a specified interval. |
| Grouped Freshness Expectation |
Aggregate rule that evaluates whether the latest grouped data in a column is newer than a specified interval. |
| Ordered Schema Match Expectation |
Aggregate rule that evaluates whether the ordered columns in the table exactly match an ordered, specified list. |
| Row Count Equality Expectation |
Aggregate rule that evaluates whether the number of rows in the table equals a specified value. |
| Row Count Range Expectation |
Aggregate rule that evaluates whether the number of rows in the table lies within a specified range. |
| Schema Containment Expectation |
Aggregate rule that evaluates whether the set of columns in the table contain all the columns in a specified set. This rule requires bigquery.tables.get, bigquery.tables.list, and bigquery.datasets.get permissions on the table and dataset being queried. |
| Schema Exclusion Expectation |
Aggregate rule that evaluates whether the columns in the table aren't in a specified set. This rule requires bigquery.tables.get, bigquery.tables.list, and bigquery.datasets.get permissions on the table and dataset being queried. |
| Schema Match Expectation |
Aggregate rule that evaluates whether the columns in the table exactly match a specified set. This rule requires bigquery.tables.get, bigquery.tables.list, and bigquery.datasets.get permissions on the table and dataset being queried. |
| Table Comparison Aggregate Equality Expectation |
Aggregate rule that evaluates whether the result of an aggregate expression is equal between the current table and a specified reference table. |
| Table Comparison Aggregate Range Expectation |
Aggregate rule that evaluates whether the result of an aggregate expression on the current table deviates from the reference table by more than a specified tolerance. |
| Table Comparison Row Count Equality Expectation |
Aggregate rule that evaluates whether the number of rows in the current table is equal to the number of rows in a specified reference table, with optional row filtering before counting. |
| Table Comparison Row Count Factor Equality Expectation |
Aggregate rule that evaluates whether the number of rows in the current table is equal to a factor of the number of rows in a specified reference table, with optional row filtering before counting. |
Missing values, unique values, and types
| Name |
Description |
| Column Type Expectation |
Aggregate rule that evaluates whether the column data type matches a specified type. This rule requires bigquery.tables.get, bigquery.tables.list, and bigquery.datasets.get permissions on the table and dataset being queried. |
| Column Type List Expectation |
Aggregate rule that evaluates whether the column data type is in a specified set. This rule requires bigquery.tables.get, bigquery.tables.list, and bigquery.datasets.get permissions on the table and dataset being queried. |
| Non Null Expectation |
Row-level rule that evaluates whether each column value is not null. |
| Null Expectation |
Row-level rule that evaluates whether each column value is null. |
| String Case Expectation |
Row-level rule that evaluates whether each column value string matches a specified casing. |
| Uniqueness Expectation |
Row-level rule that evaluates whether each column value is unique. |
Sets and ranges
| Name |
Description |
| Decreasing Expectation |
Aggregate rule that evaluates whether the values in a column are decreasing. NULL values are ignored. Returns the first row where the expectation isn't met. |
| Increasing Expectation |
Aggregate rule that evaluates whether the values in a column are increasing. NULL values are ignored. Returns the first row where the expectation isn't met. |
| Range Expectation |
Row-level rule that evaluates whether each column value lies within a specified range. |
| Reference Set Expectation |
Row-level rule that evaluates whether each column value is contained by a specified reference set. |
| Set Exclusion Expectation |
Row-level rule that evaluates whether each column value isn't contained by a specified set. |
| Set Expectation |
Row-level rule that evaluates whether each column value is contained by a specified set. |
String matching
Aggregate functions
Multi-column
Distributional functions
Generic conditions
| Name |
Description |
| Row Condition Expectation |
Row-level rule that evaluates whether each row in a table passes the specified condition. |
| SQL Assertion |
Aggregate rule that evaluates the number of rows returned for the provided statement. If any rows are returned, this rule fails. |
| Table Condition Expectation |
Aggregate rule that evaluates whether the provided expression is true for a table. |
What's next
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-08-11 UTC.
[null,null,["Last updated 2026-08-11 UTC."],[],[]]