What is lightdash.config.yml?
Thelightdash.config.yml file is an optional configuration file that allows you to define project-wide settings for your Lightdash project. Think of it as a way to customize and enhance your Lightdash experience beyond the basic setup.
Do I need this file?
You don’t needlightdash.config.yml to get started with Lightdash! This file is for users who want to:
- Organize metrics in Spotlight with custom categories and visibility settings
- Create parameters that users can change to modify data across multiple charts and dashboards
Getting started
Before creating alightdash.config.yml file, make sure you have:
- ✅ A working Lightdash project (completed the getting started guide)
- ✅ A local dbt project (not connected to dbt Cloud)
- ✅ The Lightdash CLI installed and configured
1
Create the file
Create a new file called
lightdash.config.yml in the root directory of your dbt project - this is the same folder where your dbt_project.yml file is located.2
Add your first configuration
Start with a simple configuration. Here’s a basic example that sets up Spotlight categories:
3
Deploy your changes
After creating or updating your That’s it! Your configuration is now active in your Lightdash project.
lightdash.config.yml file, deploy the changes to your Lightdash project:Configuration options
Thelightdash.config.yml file supports the following top-level configuration options:
Spotlight configuration
Thespotlight section allows you to configure project-wide spotlight settings. This section is required in the lightdash.config.yml file.
| Property | Required | Value | Description |
|---|---|---|---|
default_visibility | No | string enum | The default visibility of spotlight metrics. Defaults to show, can also be set to hide. |
categories | No | Object | Define the categories that can be used in Spotlight on your model yml files. |
categories object requires the following properties:
| Property | Required | Value | Description |
|---|---|---|---|
label | Yes | string | The label of the category as it will be displayed in Spotlight. |
color | No | string enum | The color of the category. If not provided, it will be set to gray. Allowed values: gray, violet, red, orange, green, blue, indigo, pink, yellow. |
Parameters configuration
Theparameters section allows you to define project-wide parameters that can be referenced in various parts of your Lightdash project.
| Property | Required | Value | Description |
|---|---|---|---|
label | Yes | string | A user-friendly label for the parameter as it will be displayed in the UI. |
description | No | string | A description of the parameter. |
type | No | ”string” or “number” | The type of the parameter. Defaults to “string” if not specified. |
options | No | Array of strings or numbers | A list of possible values for the parameter. |
default | No | string, number, or Array of strings/numbers | The default value(s) for the parameter. |
multiple | No | boolean | Whether the parameter input will be a multi-select. |
allow_custom_values | No | boolean | Whether users can input custom values beyond predefined options. |
options_from_dimension | No | Object | Get parameter options from a dimension in a model. Requires model and dimension arguments (see below). |
options_from_dimension, the object requires the following properties:
| Property | Required | Value | Description |
|---|---|---|---|
model | Yes | string | The model containing the dimension. |
dimension | Yes | string | The dimension to get options from. |
Using parameters in your project
Parameters defined in thelightdash.config.yml file can be referenced in various parts of your Lightdash project using the syntax ${lightdash.parameters.parameter_name} or the shorter alias ${ld.parameters.parameter_name}.
For example, to reference a parameter named region: