lightdash validate lists the rest as Private content, without a name.


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 dbtin the app - the command
lightdash deployis run on the Lightdash CLI (you can read more about automatically deploying with GitHub Actions) - you update your project settings and hit
Test and compile. - you hit
Run validationdirectly inside the content validator dashboard - you run
lightdash validatefrom 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_revenuetosum_revenue. The old metric name is used in a chart, so it breaks the chart. - Deleting a dimension
is_premium_userwhich is referenced in a metric’s custom SQL definition. - Deleting a dimension
is_premium_userwhich is used as a filter on a dashboard.
- 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. A dashboard error that says
The chart '<chart name>' is broken on this dashboardpoints to that chart’s own error row, which names the missing field. - Data apps: errors in data apps are caused when an app’s code queries a table, metric, or dimension which no longer exists. The validator checks every app in the project, including apps built in Lightdash that were never downloaded as code.
How to fix errors
There are a few ways to fix errors that appear in the validator: Table errors require you to check your YAML and fix orphaned references. This can be done with find and replace in your code editor. Chart and dashboard errors can be resolved by opening the content in Lightdash and updating the field references, but this usually means you have to rebuild your chart(s). The preferred method to resolve errors is to rename fields in the app or uselightdash rename in the CLI. You can also find and replace references in charts and dasboards using dashboards as code.
Restoring an earlier version of a chart or dashboard doesn’t fix an error if that version references the same missing field. The validator’s Fix button only points a broken reference at another field or model. To remove a missing field from a chart instead, open the chart for editing, click the trash icon next to the missing field (it’s marked with a warning icon in the field list), and save the chart.
How to delete broken content
To delete broken charts and dashboards instead of fixing them, select their rows in the validation table and click Delete content. Above the table, errors are grouped by cause. On a group for a missing model, the trash icon (Delete all content referencing this model) deletes every chart that references the model, and leaves dashboards for you to review. Table and data app errors, and rows for private content, can’t be deleted from the validator. If soft delete is on, you can restore deleted content from Recently deleted; otherwise deleting can’t be undone.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.