Appearance
Validate
Use diver validate to check *.diver.yml files the way previewing or publishing them would, without saving anything.
bash
diver validate dashboards.diver.ymlValidating is the fastest way to find mistakes in a file, such as a missing title, an unknown source or a reusable chart the file doesn't define. Nothing in the workspace changes, and no preview is created.
What it checks
The CLI sends each file to Diver, which reads it like a preview or publish would and then throws the result away. It checks:
- The file's structure and required fields.
- That every dataset's
sourceexists in the workspace. - That every reusable chart a dashboard places is defined, and that the definitions are valid.
It doesn't run the queries. A query with a typo or the wrong column only fails when the dashboard loads, so preview the file to check the data.
Output
For a valid file, the command lists each dashboard with the number of charts it would have:
text
✓ diver/sales.diver.yml
Sales Overview (sales-overview): 6 charts
Finance (finance): 4 chartsFor an invalid file, it prints what to fix:
text
✗ diver/sales.diver.yml
Dashboard finance places chart weekly-revenue, which the file doesn't define.The command checks every file, even when an earlier one is invalid, and exits with status 1 when any file is invalid. That makes it useful in CI.
Validate every resource in a project
Run the command without a file to check every *.diver.yml file below the current directory:
bash
diver validateCheck against another source
Use --source to check every chart against one source instead of the ones in the files, as diver preview --source would query them:
bash
diver validate --source warehouse-stagingYou need the Analyst or Admin role in the workspace to validate.