Skip to main content

YAML validation

If you edit your Lightdash YAML in VS Code — dbt model schema files, or charts and dashboards managed as content as code — set up schema validation so formatting and configuration issues are flagged before you compile or upload. You get autocomplete for supported properties and inline errors for invalid ones, using the same logic Lightdash applies when compiling your project. The same setup works in Cursor and other editors built on VS Code: install the YAML extension (redhat.vscode-yaml) from the editor’s extension marketplace, then add the same yaml.schemas block to its settings.json. To have an AI coding agent in Cursor write Lightdash YAML, also install the Lightdash agent skills.
1

Install the YAML extension

2

Map the Lightdash schemas in settings.json

Add the schemas to your settings.json file. Read this guide for details on how to edit settings.json.
settings.json
Adjust the chart and dashboard globs to match where you write content as code. The defaults above assume lightdash download wrote to lightdash/charts/ and lightdash/dashboards/.
Once the extension is installed and your settings are updated, you’ll see warnings like this when working on your schema.yml files.
A schema.yml file in VS Code with count_distinctt underlined in red and a tooltip listing the accepted metric types