Rule libraries in Knowledge Catalog (formerly Dataplex Universal Catalog) let you create and manage
custom GoogleSQL rule templates so you can reuse data quality rules
across multiple tables. Centralizing these definitions helps you update business
logic in one place instead of duplicating SQL across individual scans.

For conceptual background, SQL parameter syntax, and aspect schemas, see [About
reusing data quality rules](https://docs.cloud.google.com/knowledge-catalog/docs/reuse-data-quality-rules).
After you create templates, you can [apply them to catalog entries and data
quality scans](https://docs.cloud.google.com/knowledge-catalog/docs/apply-reusable-data-quality-rules).

## Limitations

The following limitations apply when creating rule libraries and custom rule
templates:

- You can't change a rule library's location after you create it.
- Each custom rule template supports one SQL query in `sqlCollection`.
- A data quality scan or catalog entry can reference a custom rule template only if the template is in the same region or in the `global` location.

## Before you begin

This document is for data stewards and data engineers who author and maintain
standardized validation logic. Follow these tasks in order:

1. [Browse system rule templates](https://docs.cloud.google.com/knowledge-catalog/docs/manage-data-quality-rule-templates.md.txt#browse-system-templates) to check whether a Google-managed template already meets your requirements.
2. If you need custom SQL logic, then [create a rule library](https://docs.cloud.google.com/knowledge-catalog/docs/manage-data-quality-rule-templates.md.txt#create-rule-library) to store your organization's templates, [create custom rule templates](https://docs.cloud.google.com/knowledge-catalog/docs/manage-data-quality-rule-templates.md.txt#create-template) inside it, and [verify the saved templates](https://docs.cloud.google.com/knowledge-catalog/docs/manage-data-quality-rule-templates.md.txt#view-list-templates).
3. [Apply your templates to scans or catalog entries](https://docs.cloud.google.com/knowledge-catalog/docs/apply-reusable-data-quality-rules.md.txt) to start validating BigQuery tables.

Before you start, review the following concepts and complete the setup
requirements:

- Understand how rule libraries, templates, and scans fit together in [About reusing data quality rules](https://docs.cloud.google.com/knowledge-catalog/docs/reuse-data-quality-rules.md.txt).
- Review parameter and assertion rules in [SQL query syntax for rule templates](https://docs.cloud.google.com/knowledge-catalog/docs/reuse-data-quality-rules.md.txt#rule-template-sql-syntax).


Enable the Dataplex API, if it is not already enabled.


**Roles required to enable APIs**


To enable APIs, you need the `serviceusage.services.enable` permission. If you
created the project, then you likely already have this permission through the
Owner role (`roles/owner`). Otherwise, you can get this permission through the
Service Usage Admin role (`roles/serviceusage.serviceUsageAdmin`).
[Learn how to grant roles](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).

[Enable the API](https://console.cloud.google.com/apis/enableflow?apiid=dataplex.googleapis.com)

### Required roles


To get the permissions that
you need to create, view, list, update, and delete rule libraries and custom rule templates,

ask your administrator to grant you the
following IAM roles on the project or entry group that stores your rule library:

- Create, update, and delete rule libraries: [Dataplex Catalog Editor](https://docs.cloud.google.com/iam/docs/roles-permissions/dataplex.md.txt#dataplex.catalogEditor) (`roles/dataplex.catalogEditor`)
- Create, view, list, update, and delete custom rule templates using the API or direct entry-group path: [Dataplex Entry and EntryLink Owner](https://docs.cloud.google.com/iam/docs/roles-permissions/dataplex.md.txt#dataplex.entryOwner) (`roles/dataplex.entryOwner`)


For more information about granting roles, see [Manage access to projects, folders, and organizations](https://docs.cloud.google.com/iam/docs/granting-changing-revoking-access.md.txt).


These predefined roles contain

the permissions required to create, view, list, update, and delete rule libraries and custom rule templates. To see the exact permissions that are
required, expand the **Required permissions** section:


#### Required permissions

The following permissions are required to create, view, list, update, and delete rule libraries and custom rule templates:

- Create and manage rule libraries:
  - `dataplex.entryGroups.create`
  - `dataplex.entryGroups.get`
  - `dataplex.entryGroups.list`
  - `dataplex.entryGroups.update`
  - `dataplex.entryGroups.delete`
- Create, update, and delete custom rule templates:
  - `dataplex.entries.create`
  - `dataplex.entries.update`
  - `dataplex.entries.delete`
  - `dataplex.entryGroups.useDataQualityRuleTemplateEntry`
  - `dataplex.entryGroups.useDataQualityRuleTemplateAspect`
- View and list rule templates:
  - `dataplex.entries.get`
  - `dataplex.entries.getData`
  - `dataplex.entries.list`


You might also be able to get
these permissions
with [custom roles](https://docs.cloud.google.com/iam/docs/creating-custom-roles.md.txt) or
other [predefined roles](https://docs.cloud.google.com/iam/docs/roles-overview.md.txt#predefined).

The Dataplex Catalog Editor (`roles/dataplex.catalogEditor`) role also includes
all permissions needed to create, view, list, update, and delete custom rule
templates. To browse **Rule libraries \> Custom** in the
Google Cloud console, you also need the `dataplex.entryGroups.list` permission on
the project, which isn't included in `roles/dataplex.entryOwner`. You can grant
`dataplex.entryGroups.list` through Dataplex Catalog Viewer
(`roles/dataplex.catalogViewer`), Dataplex Entry Group Owner
(`roles/dataplex.entryGroupOwner`), or Dataplex Catalog Editor
(`roles/dataplex.catalogEditor`). For read-only access to view and list custom
rule templates without write or delete permissions, grant a
[custom role](https://docs.cloud.google.com/iam/docs/creating-custom-roles.md.txt) with only the
`dataplex.entries.get`, `dataplex.entries.getData`, and `dataplex.entries.list`
permissions.

## Browse system rule templates

Before authoring custom SQL templates, check the Google-managed system rule
templates in the global `rule-library` entry group to see whether a predefined
template meets your validation requirements. For descriptions of every
predefined template, see
[System rule templates list](https://docs.cloud.google.com/knowledge-catalog/docs/system-rule-templates-list.md.txt).

Select one of the following options:

### Console

1. In the Google Cloud console, go to the **Data profiling \& quality**
   page.


   [Go to Data profiling \& quality](https://console.cloud.google.com/dataplex/govern/data-profiling-and-quality)

   <br />

2. Click **Rule libraries \> System**.

3. To view all available system rule templates, click **rule-library**.

4. Optional: To inspect a template's SQL logic, input parameters, and
   capabilities, click the template name.

### REST

To list available system rule templates, send a `GET` request to the
[`projects.locations.entryGroups.entries.list`](https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries/list.md.txt)
method:

```bash
curl -X GET \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  "https://dataplex.googleapis.com/v1/projects/dataplex-templates/locations/global/entryGroups/rule-library/entries"
```

The response lists the system rule template entries in the global
`rule-library` entry group, including each template's `name`,
`entrySource.displayName`, and `entrySource.description`.

## Create a rule library

If no system template covers your validation logic, then create a rule library
entry group to organize and store your organization's custom rule templates.
Choose the same region as your target scans---or select `global` to share
templates across regions---because you can't change the location after you create
the library. For rule library ID rules, see
[Resource naming conventions](https://docs.cloud.google.com/compute/docs/naming-resources.md.txt#resource-name-format).

Select one of the following options:

### Console

1. In the Google Cloud console, go to the **Data profiling \& quality**
   page.


   [Go to Data profiling \& quality](https://console.cloud.google.com/dataplex/govern/data-profiling-and-quality)

   <br />

2. Click **Rule libraries \> Custom** , and then click
   **Create**.

3. In the **Create rule library** pane, complete the following fields:

   1. Optional: In the **Display name** field, enter a display name.
   2. In the **Rule library ID** field, enter a unique ID.
   3. Optional: In the **Description** field, enter a description.
   4. In the **Location** menu, select a region or **global**. You can't change this location after creation.
   5. Optional: To group related resources, add key-value labels.
4. To create the library, click **Save**.

5. Verify that the rule library appears in the **Custom** list.

### REST

To create a rule library, send a `POST` request to the
[`projects.locations.entryGroups.create`](https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/projects.locations.entryGroups/create.md.txt)
method with the required `goog-dataplex-entry-group-type: rule_library`
label:

```bash
curl -X POST \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "Content-Type: application/json" \
  "https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/entryGroups?entryGroupId=RULE_LIBRARY_ID" \
  -d '{
    "displayName": "DISPLAY_NAME",
    "description": "DESCRIPTION",
    "labels": {
      "goog-dataplex-entry-group-type": "rule_library"
    }
  }'
```

Replace the following:

- `PROJECT_ID`: the Google Cloud project ID (for example, `test-project`).
- `LOCATION`: the region or `global` location for the rule library (for example, `us-central1`).
- `RULE_LIBRARY_ID`: a unique ID for the rule library (for example, `finance-rule-library`).
- `DISPLAY_NAME`: an optional human-readable name for the rule library.
- `DESCRIPTION`: an optional description of the rule library.

### Terraform

To create a rule library, use the
[`google_dataplex_entry_group`](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/dataplex_entry_group)
resource in the Terraform Registry:

```terraform
resource "google_dataplex_entry_group" "rule_library" {
  project        = "PROJECT_ID"
  location       = "LOCATION"
  entry_group_id = "RULE_LIBRARY_ID"
  display_name   = "DISPLAY_NAME"
  description    = "DESCRIPTION"

  labels = {
    "goog-dataplex-entry-group-type" = "rule_library"
  }
}
```

Replace the following:

- `PROJECT_ID`: the Google Cloud project ID (for example, `test-project`).
- `LOCATION`: the region or `global` location for the rule library (for example, `us-central1`).
- `RULE_LIBRARY_ID`: a unique ID for the rule library (for example, `finance-rule-library`).
- `DISPLAY_NAME`: an optional human-readable name for the rule library.
- `DESCRIPTION`: an optional description of the rule library.

## Create a custom rule template

After creating a rule library, add custom rule templates inside it to define
parameterized GoogleSQL checks that teams can reuse across scans
and catalog entries. For query guidelines and system parameters, see
[SQL query syntax for rule templates](https://docs.cloud.google.com/knowledge-catalog/docs/reuse-data-quality-rules.md.txt#rule-template-sql-syntax).
For ID requirements, dimensions, and aspect fields, see
[Resource naming conventions](https://docs.cloud.google.com/compute/docs/naming-resources.md.txt#resource-name-format),
[Data quality dimensions](https://docs.cloud.google.com/knowledge-catalog/docs/auto-data-quality-overview.md.txt#dimensions),
and
[Rule template aspect fields](https://docs.cloud.google.com/knowledge-catalog/docs/reuse-data-quality-rules.md.txt#rule-template-fields).

> [!CAUTION]
> **Caution:** Custom `${param(PARAMETER_NAME)}` placeholders perform raw text substitution without SQL escaping, even when wrapped in backticks such as `` `${param(reference_table)}` ``. Allow only trusted principals to author custom rule templates or supply `templateReference.values` on scans, tables, and glossary terms.

Select one of the following options:

### Console

1. In the Google Cloud console, go to the **Data profiling \& quality**
   page.


   [Go to Data profiling \& quality](https://console.cloud.google.com/dataplex/govern/data-profiling-and-quality)

   <br />

2. Click **Rule libraries \> Custom**.

3. Click the rule library where you want to add a template, and then click
   **Create**.

4. In the **Create rule template** pane, enter the template metadata:

   1. Optional: In the **Template name** field, enter a name for the template.
   2. In the **Template ID** field, enter a unique ID.
   3. Optional: In the **Description** field, enter a description.
   4. In the **Dimension** menu, select a data quality dimension.
5. In the **SQL query** field, enter a query that returns invalid rows
   without a trailing semicolon. For example, the following query checks
   whether column values fall between two bounds:

   ```googlesql
   SELECT *
   FROM ${data()}
   WHERE
     NOT ((${column()} >= ${param(min_value)} AND ${column()} <= ${param(max_value)}) IS TRUE)
   ```
6. Optional: To let referencing rules configure pass-ratio thresholds,
   select **Support threshold**.

7. Optional: To let referencing rules ignore `NULL` values, first select
   **Support threshold** , and then select **Support ignore null**.

8. In the **Input parameters** section, click **Add input parameter** , and
   then enter a name, description, and optional default value for each
   parameter in your query (for example, `min_value` and `max_value`).

9. To create the template, click **Save**.

### REST

To create a custom rule template, send a `POST` request to the
[`projects.locations.entryGroups.entries.create`](https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries/create.md.txt)
method with the `data-quality-rule-template` entry type and aspect:

```bash
curl -X POST \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "Content-Type: application/json" \
  "https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/entryGroups/RULE_LIBRARY_ID/entries?entryId=TEMPLATE_ID" \
  -d '{
    "entryType": "projects/dataplex-types/locations/global/entryTypes/data-quality-rule-template",
    "entrySource": {
      "displayName": "DISPLAY_NAME",
      "description": "DESCRIPTION"
    },
    "aspects": {
      "dataplex-types.global.data-quality-rule-template": {
        "data": {
          "dimension": "VALIDITY",
          "sqlCollection": [
            {
              "query": "SELECT t.* FROM ${data()} AS t LEFT JOIN `${param(reference_table)}` AS s ON t.${column()} = s.`${param(reference_column)}` WHERE s.`${param(reference_column)}` IS NULL"
            }
          ],
          "inputParameters": {
            "reference_table": {
              "description": "Reference table in PROJECT_ID.DATASET_ID.TABLE_ID format."
            },
            "reference_column": {
              "description": "Primary key column in the reference table."
            }
          },
          "capabilities": ["THRESHOLD"]
        }
      }
    }
  }'
```

Replace the following:

- `PROJECT_ID`: the Google Cloud project ID (for example, `test-project`).
- `LOCATION`: the location of the rule library (for example, `us-central1`).
- `RULE_LIBRARY_ID`: the ID of the rule library entry group.
- `TEMPLATE_ID`: a unique ID for the rule template (for example, `foreign-key-check`).
- `DISPLAY_NAME`: a human-readable display name for the template.
- `DESCRIPTION`: a description of what the template validates.

### Terraform

To create a custom rule template, use the
[`google_dataplex_entry`](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/dataplex_entry)
resource in the Terraform Registry. Escape `${...}` parameters as `$${...}`
so Terraform doesn't interpolate them as HCL variables, and use
`655216118709` (the project number for `dataplex-types`) in `entry_type` and
`aspect_key`:

```terraform
resource "google_dataplex_entry" "rule_template" {
  project        = "PROJECT_NUMBER"
  location       = "LOCATION"
  entry_group_id = "RULE_LIBRARY_ID"
  entry_id       = "TEMPLATE_ID"

  entry_type = "projects/655216118709/locations/global/entryTypes/data-quality-rule-template"

  entry_source {
    display_name = "DISPLAY_NAME"
    description  = "DESCRIPTION"
  }

  aspects {
    aspect_key = "655216118709.global.data-quality-rule-template"
    aspect {
      data = jsonencode({
        dimension = "VALIDITY"
        sqlCollection = [
          {
            query = "SELECT t.* FROM $${data()} AS t LEFT JOIN `$${param(reference_table)}` AS s ON t.$${column()} = s.`$${param(reference_column)}` WHERE s.`$${param(reference_column)}` IS NULL"
          }
        ]
        inputParameters = {
          reference_table = {
            description = "Reference table in PROJECT_ID.DATASET_ID.TABLE_ID format."
          }
          reference_column = {
            description = "Primary key column in the reference table."
          }
        }
        capabilities = ["THRESHOLD"]
      })
    }
  }
}
```

Replace the following:

- `PROJECT_NUMBER`: the Google Cloud project number.
- `LOCATION`: the location of the rule library (for example, `us-central1`).
- `RULE_LIBRARY_ID`: the ID of the rule library entry group.
- `TEMPLATE_ID`: a unique ID for the rule template (for example, `foreign-key-check`).
- `DISPLAY_NAME`: a human-readable display name for the template.
- `DESCRIPTION`: a description of what the template validates.

## View and list custom rule templates

Before teams reference your custom rule templates in scans or catalog entries,
inspect the templates to verify that your SQL logic, parameters, and
capabilities are saved as expected.

Select one of the following options:

### Console

1. In the Google Cloud console, go to the **Data profiling \& quality**
   page.


   [Go to Data profiling \& quality](https://console.cloud.google.com/dataplex/govern/data-profiling-and-quality)

   <br />

2. Click **Rule libraries \> Custom**.

3. Click the rule library that contains your templates.

4. In the **Rule templates** list, review the listed template names and
   descriptions.

5. To view the dimension, SQL query, input parameters, and capabilities,
   click a template name.

### REST

To inspect a specific custom rule template including its aspect data, send a
`GET` request to the
[`projects.locations.entryGroups.entries.get`](https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries/get.md.txt)
method with `view=ALL`. To list all templates in a library, use
[`projects.locations.entryGroups.entries.list`](https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries/list.md.txt).

```bash
curl -X GET \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  "https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/entryGroups/RULE_LIBRARY_ID/entries/TEMPLATE_ID?view=ALL"
```

Replace the following:

- `PROJECT_ID`: the Google Cloud project ID.
- `LOCATION`: the location of the rule library.
- `RULE_LIBRARY_ID`: the ID of the rule library entry group.
- `TEMPLATE_ID`: the ID of the rule template to inspect.

Verify the following fields in the response:

| Field | What to check |
|---|---|
| `name` | Full resource name used in `templateReference.name` when binding rules. |
| `aspects.*.data.dimension` | Default data quality dimension for rules referencing this template. |
| `aspects.*.data.sqlCollection` | Active parameterized SQL query evaluated during scan runs. |
| `aspects.*.data.capabilities` | Enabled rule-level capabilities (`THRESHOLD` or `IGNORE_NULL`). |

## Update a custom rule template

When your business validation requirements change, update the custom rule
template once in your rule library. Every scan referencing that template uses
the revised SQL logic, parameters, or capabilities on its next run. If you
rename or add required input parameters without a `defaultValue`, then existing
rules referencing the template fail until you update their parameter values.

Select one of the following options:

### Console

1. In the Google Cloud console, go to the **Data profiling \& quality**
   page.


   [Go to Data profiling \& quality](https://console.cloud.google.com/dataplex/govern/data-profiling-and-quality)

   <br />

2. Click **Rule libraries \> Custom**.

3. Click the rule library that contains the template that you want to
   update.

4. In the **Rule templates** list, click the template name.

5. On the rule template details page, click
   **Edit**.

6. Update the template fields, and then click **Save**.

7. Verify that the updated SQL query and parameters appear on the template
   details page.

### REST

To update a custom rule template, send a `PATCH` request to the
[`projects.locations.entryGroups.entries.patch`](https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries/patch.md.txt)
method with `updateMask=aspects`:

```bash
curl -X PATCH \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "Content-Type: application/json" \
  "https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/entryGroups/RULE_LIBRARY_ID/entries/TEMPLATE_ID?updateMask=aspects" \
  -d '{
    "aspects": {
      "dataplex-types.global.data-quality-rule-template": {
        "data": {
          "dimension": "VALIDITY",
          "sqlCollection": [
            {
              "query": "SELECT * FROM ${data()} WHERE ${column()} IS NULL"
            }
          ],
          "capabilities": ["THRESHOLD"]
        }
      }
    }
  }'
```

Replace the following:

- `PROJECT_ID`: the Google Cloud project ID.
- `LOCATION`: the location of the rule library.
- `RULE_LIBRARY_ID`: the ID of the rule library entry group.
- `TEMPLATE_ID`: the ID of the rule template to update.

### Terraform

To update a custom rule template, modify the `aspects` block of the
[`google_dataplex_entry`](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/dataplex_entry)
resource and run `terraform apply`:

```terraform
resource "google_dataplex_entry" "rule_template" {
  project        = "PROJECT_NUMBER"
  location       = "LOCATION"
  entry_group_id = "RULE_LIBRARY_ID"
  entry_id       = "TEMPLATE_ID"

  entry_type = "projects/655216118709/locations/global/entryTypes/data-quality-rule-template"

  aspects {
    aspect_key = "655216118709.global.data-quality-rule-template"
    aspect {
      data = jsonencode({
        dimension = "VALIDITY"
        sqlCollection = [
          {
            query = "SELECT * FROM $${data()} WHERE $${column()} IS NULL"
          }
        ]
        capabilities = ["THRESHOLD"]
      })
    }
  }
}
```

Replace the following:

- `PROJECT_NUMBER`: the Google Cloud project number.
- `LOCATION`: the location of the rule library.
- `RULE_LIBRARY_ID`: the ID of the rule library entry group.
- `TEMPLATE_ID`: the ID of the rule template to update.

## Delete a custom rule template

When you retire a custom validation check that active scans or catalog entries
no longer need, delete the template from your rule library. Removing retired
templates prevents other teams from referencing obsolete logic.

> [!CAUTION]
> **Caution:** Deleting a custom rule template breaks any data quality scans or catalog `data-rules` aspects that still reference it. Before you delete a template, remove or migrate all references to it.

Select one of the following options:

### Console

1. In the Google Cloud console, go to the **Data profiling \& quality**
   page.


   [Go to Data profiling \& quality](https://console.cloud.google.com/dataplex/govern/data-profiling-and-quality)

   <br />

2. Click **Rule libraries \> Custom**.

3. Click the rule library that contains the template that you want to
   delete.

4. In the **Rule templates** list, click the template name.

5. Click **Delete** , and then click **Delete** again to confirm.

6. Verify that the template no longer appears in the **Rule templates**
   list.

### REST

To delete a custom rule template, send a `DELETE` request to the
[`projects.locations.entryGroups.entries.delete`](https://docs.cloud.google.com/knowledge-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries/delete.md.txt)
method:

```bash
curl -X DELETE \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  "https://dataplex.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION/entryGroups/RULE_LIBRARY_ID/entries/TEMPLATE_ID"
```

Replace the following:

- `PROJECT_ID`: the Google Cloud project ID.
- `LOCATION`: the location of the rule library.
- `RULE_LIBRARY_ID`: the ID of the rule library entry group.
- `TEMPLATE_ID`: the ID of the rule template to delete.

## Troubleshoot

If you encounter errors while creating or updating rule templates, then check
the following common causes:

- **SQL syntax validation fails** : remove any trailing semicolon (`;`) from the query string, and verify that parameter names match case exactly between `${param(PARAMETER_NAME)}` and `inputParameters`.
- **`IGNORE_NULL` capability rejected** : confirm that `capabilities` also includes `THRESHOLD`, because `IGNORE_NULL` requires `THRESHOLD` and applies only to column-level rules.
- **Permission denied when saving a template** : verify that you have the Dataplex Catalog Editor (`roles/dataplex.catalogEditor`) or Dataplex Entry and EntryLink Owner (`roles/dataplex.entryOwner`) role on the entry group. If you use a custom role, then verify that it includes the `dataplex.entryGroups.useDataQualityRuleTemplateEntry` and `dataplex.entryGroups.useDataQualityRuleTemplateAspect` permissions.

## What's next

- Attach rules to tables and glossary terms and run scans in [Apply data quality rules and run scans](https://docs.cloud.google.com/knowledge-catalog/docs/apply-reusable-data-quality-rules.md.txt).
- Explore all predefined checks in [System rule templates list](https://docs.cloud.google.com/knowledge-catalog/docs/system-rule-templates-list.md.txt).
- Review architecture, SQL syntax, and aspect schemas in [About reusing data quality rules](https://docs.cloud.google.com/knowledge-catalog/docs/reuse-data-quality-rules.md.txt).
- Automate rule deployments in [Manage data quality rules as code with Terraform, Cloud Build, and GitHub](https://docs.cloud.google.com/knowledge-catalog/docs/manage-data-quality-rules-as-code.md.txt).