> ## Documentation Index
> Fetch the complete documentation index at: https://lightdash-mintlify-c52c5730.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Lightdash Validate

> You can check to see if your changes break any of the content in your project using `lightdash validate`. This command will run the validator which will return a list of content in your project that is broken and details about the errors.

You can trigger a validation on a project using the Lightdash CLI so you can check locally if your changes will break anything. You can also add `lightdash validate` to your [GitHub Actions](#configure-github-actions) so changes can't be merged unless they pass the validation.

## Usage

<Frame>
  <img src="https://mintcdn.com/lightdash-mintlify-c52c5730/jQnEfjdks6N5jiKE/images/guides/cli/cli-validate-a18f39c4e5dc0eab842d963fe17188a0.png?fit=max&auto=format&n=jQnEfjdks6N5jiKE&q=85&s=70ea8859ad1e73286924e998463b77da" alt="CLI validate" width="1148" height="262" data-path="images/guides/cli/cli-validate-a18f39c4e5dc0eab842d963fe17188a0.png" />
</Frame>

### Validate your changes against your project by running lightdash validate

You can run `lightdash validate` to check if your changes break any of the content in production. By default, `lightdash validate` will check your changes against the content in the project you've selected on the CLI. You can change your project using `lightdash config set-project`.

```bash theme={null}
lightdash validate
```

Optionally you can use the `--preview` argument to validate your last preview environment created from the CLI.

You will get a list of errors if your local files are going to break some content on your project. These errors will not be reflected on the validation table on Lightdash settings.

### Validate any project using the project UUID

You can run a validation on any project by specifying the project UUID in the `lightdash validate` command.

```bash theme={null}
lightdash validate --project <project uuid>
```

**Note:** you can get your project UUID from the Lightdash URL by selecting the ID after the `projects/`

<Frame>
  <img src="https://mintcdn.com/lightdash-mintlify-c52c5730/IfaW_aYIx9104x3q/images/references/cli-lightdash-help-86d9d11f57ca516a722c0dfcf8f2919a.png?fit=max&auto=format&n=IfaW_aYIx9104x3q&q=85&s=96ad8d162e8a11aff8ba064129dbaa96" alt="" width="1870" height="1408" data-path="images/references/cli-lightdash-help-86d9d11f57ca516a722c0dfcf8f2919a.png" />
</Frame>

### Validate only specific elements of your project

You can select which parts of your project you would like to validate using the `--only` argument.

```bash theme={null}
lightdash validate --only tables charts dashboards
```

Available options:

* `tables`

* `charts`

* `dashboards`

### Use strict compilation during validation

`lightdash validate` uses partial compilation by default. Field, join, and set-validation failures that can be isolated are reported as warnings so Lightdash can continue validating the rest of the explore; failures that cannot be isolated can still produce model errors.

Use `--no-partial-compilation` to report failures normally handled by partial compilation as model errors:

```bash theme={null}
lightdash validate --no-partial-compilation
```

Tables are included in validation by default, so model errors for tables enabled by your project's table configuration make the command exit with an error. If you use `--only` and exclude `tables`, the compile output can still show `ERROR`, but only the selected validation targets determine the final exit status. Other generic compilation warnings remain non-blocking.

This replaces the removed `PARTIAL_COMPILATION_ENABLED=false` environment-variable behavior.

### Validate physical column references against the warehouse

Use `--validate-warehouse-columns` to check supported unquoted `${TABLE}.column` references with warehouse queries that return no rows:

```bash theme={null}
lightdash validate --validate-warehouse-columns
```

Warehouse-column errors remain errors whether partial compilation is enabled or disabled. You can combine both flags for the strictest check:

```bash theme={null}
lightdash validate --validate-warehouse-columns --no-partial-compilation
```

`lightdash validate` includes tables by default, so no additional option is required. If you customize `--only`, keep `tables` in the list to run the warehouse check; use `--only tables` when you want to validate tables without charts or dashboards.

The check requires warehouse credentials and the warehouse catalog, and is skipped for dbt Cloud CLI and Lightdash YAML-only compilation. See the [CLI reference](/references/lightdash-cli#validate-physical-warehouse-columns) for supported reference syntax and all skip conditions.

## Configure Github actions

This command will create a preview environment, and then validate this preview by specifying `--preview` on the validate command.`lightdash validate` will return an error (return code 1) if there is at least 1 validation error on your project. You can use this output to block a deploy on Github actions like this

```yaml theme={null}
- name: Start preview
  run: lightdash start-preview
- name: Validate preview
  run: lightdash validate --preview
```

To learn more about setting up GitHub actions for Lightdash, check out the docs [here](/references/integrations/dbt-projects#1-automatically%3A-deploy-your-changes-to-lightdash-using-a-github-action).
