Build, configure, and deploy Lightdash analytics projects. Supports both dbt projects with embedded Lightdash metadata and pure Lightdash YAML projects without dbt. Create metrics, dimensions, charts, and dashboards using the Lightdash CLI.
Build and deploy Lightdash analytics projects. This skill covers the semantic layer (metrics, dimensions, joins) and content (charts, dashboards).
| Task | Commands | References |
|---|---|---|
| Explore data warehouse | lightdash sql to execute raw sql, read .csv results | CLI Reference |
| Define metrics & dimensions | Edit dbt YAML or Lightdash YAML | Metrics, Dimensions |
| Create charts | lightdash download, edit YAML, |
lightdash upload| Chart Types |
| Build dashboards | lightdash download, edit YAML, lightdash upload | Dashboard Reference |
| Lint yaml files | lightdash lint | CLI Reference |
| Deploy changes | lightdash deploy (semantic layer), lightdash upload (content) | CLI Reference |
| Test changes | lightdash preview | Workflows |
Always verify which project you're deploying to. Deploying to the wrong project can overwrite production content.
# Check current project
lightdash config get-project
# List available projects
lightdash config list-projects
# Switch to correct project
lightdash config set-project --name "My Project"
The YAML syntax differs significantly between project types.
| Type | Detection | Key Difference |
|---|---|---|
| dbt Project | Has dbt_project.yml | Metadata nested under meta: |
| Pure Lightdash | Has lightdash.config.yml, no dbt | Top-level properties |
# Quick detection
ls dbt_project.yml 2>/dev/null && echo "dbt project" || echo "Not dbt"
ls lightdash.config.yml 2>/dev/null && echo "Pure Lightdash" || echo "Not pure Lightdash"
dbt YAML (metadata under meta:):