Skip to main content

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 so changes can't be merged unless they pass the validation.


CLI validate

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.

lightdash validate 

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.

lightdash validate --project <project uuid> 

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

Configure Github actions

This command 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

- name: Start preview 
run: lightdash start-preview
- name: Validate
run: lightdash validate

To learn more about setting up GitHub actions for Lightdash, check out the docs here