The lightdash.config.yml file allows you to configure project-wide settings for your Lightdash project, including spotlight and parameters.
lightdash.config.yml
file is a configuration file that allows you to define project-wide settings for your Lightdash project. This file should be placed in the root of your dbt project.
lightdash.config.yml
file is not supported when your project is connected to dbt Cloud.lightdash.config.yml
file supports the following top-level configuration options:
spotlight
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: “show” or “hide” | The default visibility of spotlight metrics. Defaults to "show" . |
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
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. |
options | No | Array of strings | A list of possible values for the parameter. |
default | No | string or Array of strings | 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. |
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. |
lightdash.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
: