Skip to main content

What is lightdash.config.yml?

The lightdash.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.
lightdash.config.yml is not supported when your project is connected directly to dbt Cloud.This file only works with projects that use direct git connections or deploy with the CLI (either from local dbt projects and/or continuous deployment).

Do I need this file?

You don’t need lightdash.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
If you’re just getting started with Lightdash, you can skip this file and come back to it later when you want these advanced features.

Getting started

Before creating a lightdash.config.yml file, make sure you have:
  1. ✅ A working Lightdash project (completed the getting started guide)
  2. ✅ A local dbt project (not connected to dbt Cloud)
  3. ✅ 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 lightdash.config.yml file, deploy the changes to your Lightdash project:
That’s it! Your configuration is now active in your Lightdash project.

Configuration options

The lightdash.config.yml file supports the following top-level configuration options:

Metrics Catalog configuration

The spotlight 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

The parameters section allows you to define project-wide parameters that can be referenced in various parts of your Lightdash project.
Each parameter is defined as a key-value pair where the key is the parameter name (must be alphanumeric with underscores or hyphens) and the value is an object with the following properties: If using options_from_dimension, the object requires the following properties:

Labeled options

Static options can be authored as either plain values or { label, value } objects.
Plain string/number arrays continue to work and remain the simplest form when the label and value are the same.

Using parameters in your project

Parameters defined in the 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:
Or using the shorter alias:
See the Parameters guide for more information on how to use parameters.

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 in lightdash.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

The defaults 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, setting column_totals: false skips this extra query by default, which can reduce warehouse spend on busy projects.
This is a default, not a kill switch — charts that explicitly enable “Show column totals” still calculate totals as expected. You can also toggle this default via the API:

Case sensitivity hierarchy

The case_sensitive setting follows a hierarchy where more specific settings override broader ones:
  1. Dimension-level (highest priority) - Set on individual dimensions
  2. Explore/table-level - Set on the explore or table
  3. Project-level - Set in lightdash.config.yml defaults
  4. Default behavior - Case sensitive (true) if nothing is specified
This allows you to set organization-wide defaults while maintaining the flexibility to override them for specific explores or dimensions as needed. Example: Set case insensitivity as the project default, but override for a specific table:
See Tables reference for explore-level configuration and Dimensions reference for dimension-level configuration.

Additional time intervals

By default, Lightdash exposes a fixed set of time intervals on date and timestamp dimensions:
  • Date dimensions: DAY, WEEK, MONTH, QUARTER, YEAR
  • Timestamp dimensions: RAW, DAY, WEEK, MONTH, QUARTER, YEAR
The additional_time_intervals setting lets you append extra intervals (standard granularities or custom granularity keys) to those built-in defaults project-wide, so you don’t have to repeat time_intervals on every column.
How it works:
  • Additive only — the built-in defaults are always included; values listed here are appended after them and de-duplicated.
  • Fallback-only — if a dimension declares its own time_intervals in its model .yml, the per-column list wins and additional_time_intervals is ignored for that dimension.
  • Validation — values are validated once at project compile time. Standard granularities are accepted case-insensitively. Sub-day grains (RAW, MILLISECOND, SECOND, MINUTE, HOUR) are not valid under date and are dropped with a warning. Unknown names that don’t match a standard grain or a defined custom_granularities key are also dropped with a warning.
Example: Add HOUR to every timestamp dimension and a fiscal_quarter custom granularity to both:
A column that overrides this default still works as before:
See Dimensions reference for per-dimension configuration and the Custom granularities section below for defining custom granularity keys.

Granularity label overrides

The granularity_labels setting lets you replace how standard granularities are displayed across the project. This is useful when your business uses a non-default convention — for example, a week that starts on Monday — and you want the UI to reflect that everywhere a granularity is shown.
Supported keys are the standard Lightdash TimeFrames values, written in lowercase or uppercase, for example week, month, or hour. Unknown keys are ignored with a warning at project compile time. Where the override is applied:
  • Explorer dimension labels — the configured string replaces the built-in grain segment of the auto-generated dimension label. For example, with week: "Week starting Monday", the Order date Week dimension becomes Order date Week starting Monday.
  • Explorer sidebar tree — the same relabeling is shown in the dimension tree.
  • Date zoom dropdown — the configured string is used verbatim as the option label (e.g. Week starting Monday instead of Week).
  • Chart axis labels — axis labels that reflect the active grain pick up the override automatically.
How it works:
  • Full replacement — the configured string replaces the grain label outright. Provide the complete label you want users to see (e.g. "Week starting Monday"), not just a suffix.
  • Standard granularities only — to relabel non-standard time periods (e.g. fiscal quarters), define a custom granularity instead.
  • Project-wide — applies to every date and timestamp dimension in the project; there is no per-dimension override.
Example: Make every weekly grain advertise its week-start convention:
With this config, a created_at timestamp dimension exposes Created at Week starting Monday in the Explorer, sidebar tree, and chart axis labels, and Week starting Monday appears in the date zoom dropdown.

Custom granularities configuration

Availability: Custom granularities are a Beta feature.
The 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.
Each custom granularity is defined as a key-value pair where the key is the granularity name (must be alphanumeric with underscores) and the value is an object with the following properties:

How custom granularities work

Custom granularities are defined at the project level in lightdash.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:
The custom granularity 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

The table_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).
Each entry in 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.
To assign a table to a group, use the groups property on the model’s meta:
See Tables reference for more information on grouping tables in the sidebar.