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 the Metrics Catalog 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 Metrics Catalog 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:
Metrics Catalog configuration
Thespotlight section allows you to configure project-wide Metrics Catalog settings. spotlight is the YAML namespace that covers everything about how your metrics show up across the Metrics experience — here you set the project-wide defaults, and you can override them per model or metric in your model .yml files. This section is required in the lightdash.config.yml file.
Each category in the
categories object requires the following properties:
Parameters configuration
Theparameters section allows you to define project-wide parameters that can be referenced in various parts of your Lightdash project.
If using
options_from_dimension, the object requires the following properties:
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:
Reserved parameter names
A small set of parameter names are reserved by Lightdash and resolve automatically from the query context — you don’t need to declare them inlightdash.config.yml or in a model.
If you define a user parameter with one of these names, your user parameter shadows the reserved one. See Reserved parameters for usage details.
Defaults configuration
Thedefaults section allows you to set project-wide default settings that apply across all explores and dimensions. These defaults can be overridden at the explore or dimension level.
Disabling column totals by default
Every time you run a query in the explorer, Lightdash runs an additional warehouse query to calculate column totals for the results table footer. For cost-conscious users, settingcolumn_totals: false skips this extra query by default, which can reduce warehouse spend on busy projects.
Case sensitivity hierarchy
Thecase_sensitive setting follows a hierarchy where more specific settings override broader ones:
- Dimension-level (highest priority) - Set on individual dimensions
- Explore/table-level - Set on the explore or table
- Project-level - Set in
lightdash.config.ymldefaults - Default behavior - Case sensitive (
true) if nothing is specified
See Tables reference for explore-level configuration and Dimensions reference for dimension-level configuration.
Custom granularities configuration
Availability: Custom granularities are a Beta feature.
custom_granularities section allows you to define reusable custom time granularities that appear in the date zoom dropdown alongside standard options (Day, Week, Month, Quarter, Year). This is useful for business-specific time periods like fiscal quarters, Monday-to-Sunday weeks, or other custom date groupings.
How custom granularities work
Custom granularities are defined at the project level inlightdash.config.yml and become available on date dimensions through the time_intervals property. The ${COLUMN} template in the SQL expression is automatically replaced with the actual column SQL when generating queries.
Example: Define a fiscal quarter granularity and use it on a dimension:
fiscal_quarter will now appear in the date zoom dropdown for order_date, alongside the standard intervals.
Custom granularities inherit
requiredAttributes and anyAttributes from the parent dimension, so access controls are automatically applied.See the Date zoom guide for information on configuring which granularities appear in the dropdown and setting defaults.
Use cases
- Fiscal calendars: Define fiscal quarters or years that don’t align with calendar quarters
- Week start customization: Create weeks that start on Monday or any other day
- Custom periods: Define business-specific time periods like “retail weeks” or “academic terms”
See Dimensions reference for more information on configuring time intervals on dimensions, including how to reference custom granularities.
Table groups configuration
Thetable_groups section defines display labels and descriptions for the group keys referenced by your models in their meta.groups array. These groups are used to render nested table groups in the Explore sidebar (up to 3 levels of nesting).
table_groups is keyed by the group identifier you reference from a model’s meta.groups, and supports the following properties:
Group keys must match the pattern
^[a-zA-Z0-9_-]+$. If a key referenced from a model’s meta.groups is not defined in table_groups, the key itself is used as the label.
When you run
lightdash deploy or lightdash preview, the CLI only syncs table groups if the table_groups key is present in your config. To clear all previously deployed table groups, set table_groups: {} explicitly — omitting the key leaves the server-side groups unchanged.groups property on the model’s meta:
See Tables reference for more information on grouping tables in the sidebar.