Skip to main content

Validating your content

Broken content is not useful content. We've built tools in Lightdash to help validate your content so you can keep it useful and we'll notify you when it isn't.

In Lightdash, users with admin or developer roles can access a content validation dashboard from within a project's settings. This dashboard gives you an overview of all of the broken content in your project and detailed information about what is causing the errors.

You can access the content validation dashboard by heading to project settings, then selecting the Validator tab.

How can I validate my content?

Your project is validated any time the content validator is run. The content validator will run when:

  • a user hits Refresh dbt in the app
  • the command lightdash deploy is run on the Lightdash CLI (you can read more about automatically deploying your changes using GitHub actions here)
  • you update your project settings and hit Test and compile.
  • you hit Run validation directly inside the content validator dashboard
  • you run lightdash validate from the CLI

What content is included in the validation?

The validator will show you any errors caused by metrics or dimensions which no longer exist, have been renamed, or have invalid definitions. The validator does not show errors caused by invalid SQL at run time (e.g. invalid SQL syntax, division by 0, trying to perform numeric calculations on a string value type).

Here are some examples of errors that would appear in your content validator:

  • Renaming a metric from total_revenue to sum_revenue. The old metric name is used in a chart, so it breaks the chart.
  • Deleting a dimension is_premium_user which is referenced in a metric's custom SQL definition.
  • Deleting a dimension is_premium_user which is used as a filter on a dashboard.

The content types included in the validator dashboard are:

  • Tables - errors in tables are caused when dimensions or metrics that have been deleted or renamed but are still referenced in other places in the table.
  • Charts - errors in charts are caused when the results table or filters reference a metric or dimension which no longer exists.
  • Dashboards - errors in dashboards are caused when a chart is broken in the dashboard or a filter references a metric or dimension which no longer exists.

How to dismiss errors

You can dismiss errors from validation by clicking on the "x" button that appears when you hover over a row on the validation table.

Dismissed validation errors are applied to everyone. So, if you dismiss an error, it will be removed from everyone else's validation results as well as yours. The errors you dismissed will reappear again if you run another validation and the issue hasn't been fixed yet.