The Content Validator searches your LookML for the model, Explore, and field names that are referenced in your Looker content (Looks and dashboards). It's a useful tool for validating your LookML references, for fixing errors in your LookML after you have made changes, and for updating the names of LookML elements across your project.

You must have the [`develop`](https://docs.cloud.google.com/looker/docs/admin-panel-users-roles.md.txt#develop) permission to use the Content Validator. The Content Validator will run validation on all of the content that is based on LookML projects for which you have `develop` permission.

> [!NOTE]
> **Note:** A Looker developer can use the Content Validator to update references in Looks and dashboards, even if the developer has only the **View** [access level](https://docs.cloud.google.com/looker/docs/organizing-spaces.md.txt#folder_access_levels) for the Looks and dashboards. This allows a developer to fix content that might become broken when the developer updates the underlying LookML.

> [!WARNING]
> **Warning:** When you use the Content Validator to make updates to Looks and tiles that are based on changes that you've made in Development Mode, you might break the Looks and tiles in Production Mode until you push your Development Mode updates to production. If you are in Development Mode, the Content Validator displays a warning message that content is validated against the state of the LookML projects in your Development Mode.


To open the Content Validator, select **Content Validator** from the **Develop** menu in the [main navigation panel](https://docs.cloud.google.com/looker/docs/finding-content.md.txt#using_the_left_navigation_panel). From here, you can use the Content Validator in two ways:

- Click **Validate** to [find and fix errors that were caused by changes in your LookML model](https://docs.cloud.google.com/looker/docs/content-validation.md.txt#using_content_validator_to_fix_errors).
- Click **Find \& Replace in All Content** to [find and replace the model, Explore, or field names](https://docs.cloud.google.com/looker/docs/content-validation.md.txt#using_content_validator_to_find_and_replace) across your Looker content, whether or not there are errors in the Looker content.


## Before using the Content Validator

You must be **extremely** careful when making changes using content validation. The Content Validator does not have an undo function, and it has the potential to impact many Looks and dashboards, along with their **Explore from Here** links. If you do make a mistake, you should attempt to correct it as soon as possible, before additional changes make it harder to isolate the affected Looks.

Also, consider your timing when using the Content Validator. When you push development changes to production you should fix affected Looks and tiles at approximately the same time, so that they are broken for the minimum amount of time. If you fix Looks and tiles too early, based on your work in [Development Mode](https://docs.cloud.google.com/looker/docs/dev-mode-prod-mode.md.txt), they will appear broken to users until you push your changes. Similarly, if you delay in fixing Looks and tiles until long after pushing the changes, the Looks and tiles will appear broken to users until you fix them.

> [!NOTE]
> **Note:** If you use the Content Validator to change field names that serve as filters in your dashboards, be sure to review the **Filters** section of your dashboard schedules and update the filters as needed to reflect your changes. If a scheduled dashboard delivery includes filters that no longer function (for example, if the referenced field has changed), the scheduled delivery will fail and the schedule owner will receive an error message that a filter is invalid.
>
> Use caution when using the Content Validator to make a change to an Explore that is used in a [merged results](https://docs.cloud.google.com/looker/docs/merged-results.md.txt) dashboard tile, as the Content Validator applies any changes to *every* Explore that is included in the merged results tile. For example, you cannot use the Content Validator to change the model name in a single Explore in a merged results tile without changing the model name in all the Explores that are included in the merged results.


## Using the Content Validator to fix errors

The Content Validator is a useful tool for finding and fixing errors resulting from changes in your LookML. For example, if you change a field name from `customer` to `user`, any Looks or dashboard tiles that included the `customer` field will no longer function (unless you used the [`alias`](https://docs.cloud.google.com/looker/docs/reference/param-field-alias.md.txt) parameter). The Content Validator will list any references to the `customer` field and will also provide **Replace** or **Remove** buttons to fix the error.

When you run the Content Validator, it validates all references that your Looks and dashboards make to your LookML [models](https://docs.cloud.google.com/looker/docs/model-and-view-files#model_files), [Explores](https://docs.cloud.google.com/looker/docs/reference/param-explore-explore.md.txt), [views](https://docs.cloud.google.com/looker/docs/reference/param-view-view.md.txt), and [fields](https://docs.cloud.google.com/looker/docs/reference/param-field.md.txt), and will show an error for any references your content makes to an unknown LookML object.

The Content Validator does *not* show errors for the following:

- **Looks that have been deleted and are in the [Trash](https://docs.cloud.google.com/looker/docs/admin-spaces.md.txt#trash).** If you want to validate a deleted Look, your Looker admin must restore the Look first.
- **Content that is based on LookML models for which you don't have `develop` permission.** You can use the Content Validator only on the content that is based on models for which you have `develop` permission (the models that you can see in the Looker IDE). See the [Roles](https://docs.cloud.google.com/looker/docs/admin-panel-users-roles.md.txt#model_sets) documentation page for information on model permissions.

  > [!NOTE]
  > **Note:** As long as you have `develop` permission on the underlying model for a Look or dashboard, you can use the Content Validator to update references in the Look or dashboard, even if you have only the **View** [access level](https://docs.cloud.google.com/looker/docs/organizing-spaces.md.txt#folder_access_levels) for the Look or dashboard. This lets a developer fix content that might be broken when the developer makes changes to the underlying LookML, even when the developer doesn't have the **Manage Access, Edit** access level for the content itself.

### Running the Content Validator

> [!IMPORTANT]
> **Important:** Read the [Before using the Content Validator](https://docs.cloud.google.com/looker/docs/content-validation.md.txt#before_using_content_validator) section before proceeding. The Content Validator can impact many parts of your Looker content, so it's important to plan and consider beforehand.

When you run the Content Validator, you can scope the validation to specific LookML projects and a specific content folder (including its subfolders, if any). This can improve the performance of the Content Validator.

Note the following for Content Validator scoping:

- If you don't specify a folder or a LookML project, the validation won't be scoped. The Content Validator will validate all the content that is based on models for which you have `develop` permission.
- If you specify a content folder, the Content Validator will run validation on the content folder and all of its subfolders, if any.
- If you specify a content folder and one or more LookML projects, both conditions will apply: the Content Validator scopes its validation to only the content in the folder (and subfolders) that is based on the LookML projects you selected.
- Dashboard alerts, dashboard schedules, and Look schedules are not stored in content folders. Therefore, if you scope the content validation to a folder, the Content Validator won't validate any schedules or alerts.
- If you specify a LookML project, the Content Validator determines the project's associated models by looking at the source LookML of the specified projects and by looking at the models configured for each project, which you can see on the [**LookML Projects**](https://docs.cloud.google.com/looker/docs/manage-projects.md.txt) page. If a model file has been deleted from a LookML project and isn't shown as a model in the project on the **LookML Projects** page, the Content Validator won't show errors that are related to content based on that deleted model.

  > [!TIP]
  > **Tip:** If you want to find errors related to content based on a deleted model, where the model is no longer showing on the **LookML Projects** page, run the Content Validator without scoping the validation for LookML projects.

To run the Content Validator, follow these steps:

1. Click the Looker **Main menu** icon and select **Develop** , if the **Develop** menu isn't already displayed.
2. From the **Develop** menu, select **Content Validator**.
3. On the Content Validator page, click **Validate**.

   The Content Validator displays the **Choose Projects to Validate** dialog.
4. In the **Choose Projects to Validate** dialog, do one of the following:

   - To run the validator on all LookML projects, leave the **Select projects** field as it is, with no projects selected, and then click **Next**.
   - To run the validator on one or more specific LookML projects, click the **Select projects** drop-down menu, select the projects that you want to validate, and then click **Next**.

   The Content Validator displays the **Choose Folder to Validate** dialog.
5. In the **Choose Folder to Validate** dialog, do one of the following:

   - To run the validator on all content folders, leave the **Folders** picker as it is, with no folders selected, and then click **Next**.
   - To run the validator on one specific content folder (and its subfolders, if any), use the **Folders** picker to select the folder that you want to validate, and then click **Next**.

   The **Review Selections** dialog displays the projects and the folders that you selected for validation.
6. In the **Review Selections** dialog, click **Validate**.

The Content Validator will run validation on the content that you specified and then display the results. See the section [Viewing the content validation results](https://docs.cloud.google.com/looker/docs/content-validation.md.txt#viewing_the_content_validation_results) for information about reviewing the results.

### Viewing the content validation results

When the Content Validator completes a validation, it displays an error table. The validation results are scoped to the projects and folders that you selected when you [ran the Content Validator](https://docs.cloud.google.com/looker/docs/content-validation.md.txt#running_the_content_validator).

The content validation results show Looker content that uses model names, Explore names, view names, or field names that don't exist or can't be found. See the [Using the Content Validator to fix errors](https://docs.cloud.google.com/looker/docs/content-validation.md.txt#using_content_validator_to_fix_errors) section for details about the LookML elements that the Content Validator can find and validate.

Validation results are based on the LookML that is available in the mode you're in when you run the validator. If you are in Production Mode, the validation results will reflect all LookML that has been pushed to production. If you are in Development Mode, the validation results will reflect your saved LookML, even if the LookML hasn't been pushed to production.

The error table displays each error, along with a list of Looks and tiles that contain the error, plus the underlying model and Explore that are producing the error.

![Content Validator window showing multiple errors in validation results](https://docs.cloud.google.com/static/looker/docs/images/content-validator-results-2500.png)

You can use the **Group by** tabs at the upper right of the page to change the layout of the error table:

- **Error**: List each error, grouping together the Looker content that has the error. This is useful if you want to fix the same error in multiple pieces of content at once.
- **Folder** : List each [folder](https://docs.cloud.google.com/looker/docs/organizing-spaces.md.txt), grouping together the Looker content that has errors. This is useful if you want to fix only the errors in a particular folder.
- **Content**: List each piece of content that has errors, grouping together its errors. This is useful if you want to fix all the errors in a single Look, tile, filter, etc.


The icon next to the content's name identifies the content type:

- ![Tile on dashboard icon.](https://docs.cloud.google.com/static/looker/docs/images/dev-content-validator-icon-db-tile-2108.png) --- Dashboard tile
- ![Alert on dashboard icon.](https://docs.cloud.google.com/static/looker/docs/images/dev-content-validator-icon-db-alert-2108.png) --- Dashboard alert
- ![Schedule on dashboard or Schedule on Look icon.](https://docs.cloud.google.com/static/looker/docs/images/dev-content-validator-icon-schedule-2108.png) --- Schedule for a dashboard or Look
- ![Filter on dashboard icon.](https://docs.cloud.google.com/static/looker/docs/images/dev-content-validator-icon-db-filter-2108.png) --- Filter for a dashboard, or a field on a tile that listens to a dashboard filter (see the [Adding and editing user-defined dashboard filters](https://docs.cloud.google.com/looker/docs/filters-user-defined-dashboards.md.txt#adding_dashboard_filters) documentation page for information on configuring tiles to listen to dashboard filters)

Errors may be caused by intentional changes in your LookML as well as a typo or a missing join.

For each row, Looker provides either a **Replace** button or a **Remove** button, or both, depending on the error type. These buttons provide functionality to fix the errors and are described in more detail in [Using the Content Validator to fix errors](https://docs.cloud.google.com/looker/docs/content-validation.md.txt#using_content_validator_to_fix_errors). To adjust errors, you can use the **Replace** and **Remove** buttons in each line of the error table as follows:

- **Replace** : Looker provides the **Replace** button for each error (see the [Replacing names for fields, views, Explores, and models](https://docs.cloud.google.com/looker/docs/content-validation.md.txt#replace) section later on this page for how to replace names with the Content Validator).
- **Remove** : For errors with field names in the **Data** section of a Look or tile, Looker also displays the **Remove** button (see the [Removing a field name](https://docs.cloud.google.com/looker/docs/content-validation.md.txt#remove) section later on this page for how to remove names with the Content Validator).

Depending on your **Group by** setting, the **Replace** and **Remove** buttons will apply to a single item (Look or tile), or to multiple items:

- If you group by **Error**, the buttons apply to all occurrences of that error in all Looks and tiles on your Looker instance --- which lets you fix all occurrences in a single operation.
- If you group by **Folder** or by **Content**, the buttons apply to one occurrence of the error in a single Look or tile --- which lets you consider each occurrence of the error separately.

For example, an error table is grouped by **Error** and displays three instances of content with an unknown Explore named `customers`. The action provided for the three pieces of content is **Replace** . Clicking **Replace** would affect all three instances of content with the error `3 x Unknown explore 'customers'`.

![](https://docs.cloud.google.com/static/looker/docs/images/develop-content-validator-group-error-2308.png)


In some cases, multiple errors may exist for pieces of content. For example, an error table is grouped by **Content** and displays a piece of content called **Order Details** . There are four `Unknown field` errors displayed in the **Errors** column, and each error has its own **Replace** and **Remove** action buttons in the **Actions** column.

![](https://docs.cloud.google.com/static/looker/docs/images/develop-content-validator-group-content-214.png)

In addition, if you group by **Content** , you have the additional option to [delete Looks](https://docs.cloud.google.com/looker/docs/content-validation.md.txt#delete_looks).


### Replacing names for fields, views, Explores, and models

The content validation results include a **Replace** button for the following types of elements so that you can rename them:

- Model names in Looks and dashboard tiles
- Explore names in Looks and dashboard tiles
- View names in [custom filters](https://docs.cloud.google.com/looker/docs/filtering-and-limiting.md.txt#custom-filters) or [table calculations](https://docs.cloud.google.com/looker/docs/table-calculations.md.txt)
- View names in Looks and dashboard tiles
- Field names:
  - In the [**Data** section of a Look](https://docs.cloud.google.com/looker/docs/viewing-looks.md.txt#making_sense_of_a_look)
  - In a [query-based dashboard tile](https://docs.cloud.google.com/looker/docs/creating-user-defined-dashboards.md.txt#query_tiles)
  - Referenced in [table calculations](https://docs.cloud.google.com/looker/docs/table-calculations.md.txt)
  - Referenced in [custom filters](https://docs.cloud.google.com/looker/docs/filtering-and-limiting.md.txt#custom-filters)
  - Referenced in [custom fields](https://docs.cloud.google.com/looker/docs/custom-fields.md.txt#viewing_and_using_custom_fields)
  - Referenced in visualization configurations, such as the [**Customizations**](https://docs.cloud.google.com/looker/docs/column-options.md.txt#customizations) area of the **Series** tab for column charts
  - Referenced by a dashboard tile to listen to a dashboard filter (this is configured in the **Tiles to Update** tab of the filter configuration window, described on the [Adding and editing user-defined dashboard filters](https://docs.cloud.google.com/looker/docs/filters-user-defined-dashboards.md.txt#adding_dashboard_filters) documentation page)

For any of these errors, you can use the Content Validator to replace an attribute of the content that is equal to or more general than the attribute that is erroring:

- If a field is causing an error, you can replace or remove the field, or you can replace the view, Explore, or model name.
- If an Explore name is causing an error, you can replace the Explore name or the model name.
- If a model name is causing an error, you can replace the model name.

Here's how to use the Content Validator to replace the names of elements in your model:

1. Click **Validate** to run the Content Validator.
2. Select a **Group by** setting to choose how errors are grouped. For example, you can group by **Error** so that you can adjust multiple items at the same time.
3. In the error table, click the **Replace** button next to the error that you want to correct to open the **Update in Content** dialog.

4. In the **Type** section of the **Update in Content** dialog, select the type of LookML element that you want to change: field, view, Explore, or model. Looker displays the appropriate options for each error.

5. In the **Name** section, verify the name of the item that you want to replace. The Content Validator fills this information in automatically.

6. In the **Replacement Name** section, enter the new name of the item.

7. If you have grouped by **Error** and there are multiple items that will be affected, you can click **Show Content** to see a list of items that the Content Validator will update.

   ![](https://docs.cloud.google.com/static/looker/docs/images/develop-content-validator-replace-3-2308.png)
8. Optionally, you can clear the checkboxes next to any listed items to leave their names unchanged.

9. To make the change, click **Replace**.


### Removing a field name

For errors with field names in the **Data** section of a Look or tile, the error table will provide a **Remove** button to the right of the error. You can use the Content Validator to remove fields that are:

- In the **Data** section of a Look or dashboard tile
- Referenced in visualization configurations, such as the [**Customizations**](https://docs.cloud.google.com/looker/docs/column-options.md.txt#customizations) area of the **Series** tab for column charts
- Referenced by a dashboard tile to listen to a dashboard filter (this is configured in the **Tiles to Update** tab of the filter configuration window, described on the [Adding and editing user-defined dashboard filters](https://docs.cloud.google.com/looker/docs/filters-user-defined-dashboards.md.txt#adding_dashboard_filters) documentation page)

You cannot use the Content Validator to remove fields from [custom filters](https://docs.cloud.google.com/looker/docs/filtering-and-limiting.md.txt#custom-filters), [custom fields](https://docs.cloud.google.com/looker/docs/custom-fields.md.txt#viewing_and_using_custom_fields), or [table calculations](https://docs.cloud.google.com/looker/docs/table-calculations.md.txt), because typically you need to make additional changes to keep the expression working. Instead, use the content validation error messages to find places where custom filters, custom fields, and table calculation expressions need to be fixed, and then rework the expression as appropriate.

1. Click **Validate** to run the Content Validator.
2. Select a **Group by** setting to choose how errors are grouped. For example, you can group by **Error** so that you can adjust multiple items (Looks, tiles, or both) at the same time.
3. In the error table, click **Remove** next to the field error that you want to correct to open the **Remove Field from Content** dialog.

   ![](https://docs.cloud.google.com/static/looker/docs/images/develop-content-validator-remove-2-2308.png)
4. In the **Field** section of the **Remove Field from Content** dialog, verify the name of the item that you want to remove. The Content Validator fills this in automatically.

5. If you have grouped by **Error** and there are multiple items (Looks, tiles, or both), you can click **Show Content** to see a list of items that the Content Validator will update.

   ![](https://docs.cloud.google.com/static/looker/docs/images/develop-content-validator-remove-3-2308.png)
6. Optionally, you can clear the checkboxes next to any Looks or tiles to leave their names unchanged.

7. Click **Remove Field** to make the change.

### Deleting Looks

If you group the error table by **Content**, you have the option to delete Looks in the table.

To use the Content Validator to delete Looks:

1. Click **Validate** to run the Content Validator.
2. Group the table by **Content**.
3. In the error table, click the **Select** box next to the Look or Looks that you want to delete.
4. Click the **Delete all selected Looks** button at the top of the error table.
5. Click **OK** in the confirmation box to delete the selected Look or Looks.

> [!NOTE]
> **Note:** If you accidentally delete a Look, your Looker admin *might* be able to recover it for you. Looker stores deleted content in the trash until your Looker admin team empties the [trash](https://docs.cloud.google.com/looker/docs/admin-spaces.md.txt#trash) as part of their maintenance process.


## Using the Content Validator to find and replace

The Content Validator can also be used to search and replace the names for models, Explores, and fields. For example, you might decide that you prefer one field over another and want to make that replacement in your project, even though there is no error. The complete list of elements that the Content Validator can search and replace is provided in the [Replacing names for fields, views, Explores, and models](https://docs.cloud.google.com/looker/docs/content-validation.md.txt#replace) section.

> [!IMPORTANT]
> **Important:** Read the [Before using the Content Validator](https://docs.cloud.google.com/looker/docs/content-validation.md.txt#before_using_content_validator) section before proceeding. The Content Validator can impact many parts of your Looker content, so it's important to plan and consider beforehand.

To use the Content Validator as a find and replace tool:

1. On the Content Validator screen, click **Find \& Replace in All Content** to open the **Update in Content** dialog.
2. Select the **Type** of LookML element that you want to change (field, view, Explore, or model).
3. Enter the **Name** of the item that you want to replace.
4. Enter a **Replacement Name** for the field, view, Explore, or model.
5. Click **Replace** to make the change.

## Things to consider

Plan to rerun content validation to view the results of any fixes you make.

Note the following about the Content Validator:

- For views, Explores, or models, you can [change their names](https://docs.cloud.google.com/looker/docs/content-validation.md.txt#replace) but you cannot *remove* their names entirely. See the [Removing a field name](https://docs.cloud.google.com/looker/docs/content-validation.md.txt#remove) section for a list of items that you can remove with the Content Validator.
- Table calculations can only reference fields that are included in the query of a Look or tile. This means that if you remove a field from a Look or tile's query but a table calculation still uses that field, you'll get a new content validation error.
- Looks that have been deleted and are in the [Trash](https://docs.cloud.google.com/looker/docs/admin-spaces.md.txt#trash) folder won't be validated. If you want to validate a deleted Look, your Looker admin must restore the Look first.
- If you are in Development Mode, the validation results will reflect your saved LookML even if it hasn't been pushed to production. However, any changes that you make using the Content Validator will affect users viewing content in Production mode. Consider switching to Production mode before running the Content Validator.