Skip to content

Variables Errors

ERR-BUILTIN-SHADOWS-VARIABLE: A built-in variable has the name of a board variable

  • Level: error
  • Domain: execute
  • Suppressible: no

Message template:

The built-in {name!r} has the same name as the variable {name!r} that {origin}. A built-in name belongs to the host and cannot be renamed, so one of the two would silently win.

Fix: Rename the board's variable. For a variable a tabs layout or a details board generates, set an id: on that tabs layout or details board to give it another name.

Fired when a run is given a built-in value (the directory-navigation variables a host supplies) under a name that a variable of the board already has, either declared under variables: or generated for a tabs layout or a details board. Built-ins are not checked against the board, so a shared name would hide the board's own value.

ERR-DUPLICATE-VARIABLE-NAME: Two boards declare the same variable

  • Level: error
  • Domain: compile
  • Suppressible: no

Message template:

Duplicate variable name {name!r}: declared in {first} and {second}. Variables are global to the board, so delete one and read the other by name, or rename one if they are separate controls.

Fired when a board and a board nested in it, or an imported board, declare the same variable. A board has one variable namespace: a nested board reads an outer variable without declaring it.

ERR-FILTER-DATE-RANGE-TIMESTAMP: filter_date_range was passed the retired timestamp argument

  • Level: error
  • Domain: compile
  • Suppressible: no

Message template:

A column with a time zone dates in the board's `regional.time_zone` when passed bare, so drop `timestamp=`. A naive column that stores UTC passes `is_naive_utc=true`.

Fired when filter_date_range is called with timestamp=. The argument was replaced by is_naive_utc=true, which dates a naive timestamp column that stores UTC in the board zone. A timestamp column with a zone needs no argument.

ERR-NAME-INVALID: Name is not an identifier

  • Level: error
  • Domain: compile
  • Suppressible: no

Message template:

{kind} {name!r} at {path} must be a valid identifier: letters, digits and underscores, not starting with a digit.

Fired when a chart, query or variable name is not a valid identifier. Names are referenced as bare words in layouts, queries and Jinja templates, so a name with a space, hyphen, dot, leading digit or leading @ never worked reliably, so this catches it at compile instead of a confusing failure later.

ERR-RESERVED-VARIABLE-NAME: Variable name is reserved

  • Level: error
  • Domain: compile
  • Suppressible: no

Message template:

Variable name '{name}' is reserved. It conflicts with a dbt charts helper or dbt Jinja builtin. Choose a different name.

Fired when a board declares a variable named like a helper the template context provides: filter, filter_date_range, queries, glob_boards or glob_folders.

ERR-UNKNOWN-VARIABLE: Unknown variable referenced in template

  • Level: error
  • Domain: compile
  • Suppressible: no

Message template:

{surface} {owner_name!r} references unknown variable {var_name!r}. Declare it under `variables:` or fix the typo.

Fired when a Jinja template references a variable name that is not declared under variables:. Check for typos and ensure the variable is declared before the template that uses it.

ERR-UNKNOWN-VARIABLE-OVERRIDE: Caller set a variable the board does not declare

  • Level: error
  • Domain: execute
  • Suppressible: no

Message template:

Variable {variable!r} is not declared by this board. Declared variables: {available}.

Fired when a render or named-query run is given a value (--var, an API or MCP variables binding) for a name the board does not declare under variables:. The queries would run as if the value was never set, so a typo returns plausible-looking results for the wrong filter. Fix the name, or declare the variable on the board.

ERR-VARIABLE-COLUMN-INVALID: A variable's column binding names a column that is no SQL identifier

  • Level: error
  • Domain: compile
  • Suppressible: no

Message template:

{field_path}: column name {column!r} is not a valid SQL identifier. Use only letters, digits, and underscores.

Fix: Write the column half of table.column with letters, digits and underscores.

Fired when the column half of a variable's column: or options binding is not a bare SQL identifier, because it is interpolated into the options query.

ERR-VARIABLE-COUNT-COLUMN-MISSING: Options query does not return its count column

  • Level: error
  • Domain: execute
  • Suppressible: no

Message template:

Variable {variable!r} reads option counts from {count_column!r}, but query {query_name!r} returns only: {columns}.

Fix: Return the count column from the options query, or fix the options.count_column name.

Fired when a variable's options.count_column names a column its options query does not return. The render stops rather than drawing the menu without counts, which would hide the typo.

ERR-VARIABLE-COUNT-NOT-A-NUMBER: Option count is not a number

  • Level: error
  • Domain: execute
  • Suppressible: no

Message template:

Variable {variable!r} reads option counts from {count_column!r}, but option {option!r} has count {count!r}.

Fix: Make the options query return a whole number for every option, for example with COALESCE(count, 0).

Fired when the column a variable's options.count_column names holds a value that is not a whole number for some option, such as NULL from a LEFT JOIN. The render stops rather than drawing a count it cannot read.

ERR-VARIABLE-CYCLE: Variables depend on each other in a cycle

  • Level: error
  • Domain: compile
  • Suppressible: no

Message template:

Circular variable dependency detected: {cycle}. Variables cannot depend on each other in a cycle. Check the options queries for these variables.

Fix: Make the options query of one variable stop reading the other.

Fired when the options queries of variables read each other's values in a cycle.

ERR-VARIABLE-DEFAULT-INVALID: A variable default cannot be read as a value

  • Level: error
  • Domain: compile
  • Suppressible: no

Message template:

Variable {name!r}: {reason}. Give the variable a default that is a literal of its type.

Fired when the default of a variable a board shows is not a value the board can read.

ERR-VARIABLE-OPTIONS-COLUMN-MISSING: Options query does not return its value column

  • Level: error
  • Domain: execute
  • Suppressible: no

Message template:

Variable {variable!r} reads option values from {column!r}, but query {query_name!r} returns only: {columns}.

Fix: Return the column from the options query, or fix the options.column name.

Fired when a variable's options.column names a column its options.query does not return. The render stops rather than guessing another column, which would filter on the wrong values.

ERR-VARIABLE-OPTIONS-FAILED: Variable options query failed

  • Level: error
  • Domain: execute
  • Suppressible: no

Message template:

Variable {variable!r} could not load its options (query {query_name!r}): {cause}

Fix: Make the variable's column: or options.query name a table the board's source can read. A table outside the source's own project or database needs its fully qualified name.

Fired when the query behind a select or multiselect variable's options fails, including the query generated from column:. The render stops rather than drawing an empty dropdown, which would look like a table with no rows.

ERR-VARIABLE-TABLE-INVALID: A variable's column binding names a table that is no SQL identifier

  • Level: error
  • Domain: compile
  • Suppressible: no

Message template:

{field_path}: table name {table!r} is not a valid SQL identifier. Use only letters, digits, and underscores, optionally schema-qualified (e.g. 'gis.fact_sales').

Fix: Write the table half of table.column with letters, digits and underscores, optionally schema-qualified.

Fired when the table half of a variable's column: or options binding is not a bare SQL identifier, or a dotted chain of them, because it is interpolated into the options query.

ERR-VARIABLE-VALUE-INVALID: Variable value does not match the variable's input type

  • Level: error
  • Domain: execute
  • Suppressible: no

Message template:

Variable {variable!r}: {problem}

Fired when a value given for a variable (--var, a URL parameter, an API or MCP variables binding) cannot be read as the variable's declared input: a multiselect that is not a JSON list, a date that is not YYYY-MM-DD, a number that is not numeric, a daterange that is not [start, end] or a preset. The message names the variable and the value. Pass a value of the declared type; [] or an empty value selects everything for a multiselect.

ERR-VARIABLE-VALUE-NOT-IN-OPTIONS: Variable value is not one of the variable's options

  • Level: error
  • Domain: execute
  • Suppressible: no

Message template:

Variable {variable!r} was set to {value!r}, which is not one of its options. Valid options: {options}.

Fired when a select, radio, or multiselect variable is given a value outside its options. A static options: list is checked on every render and named-query run. Options that come from a query are checked on render only, against the rows that render already ran for the control; a named-query run does not execute the option query just to validate, and a query that returned no rows is not checked (a failed one is ERR-VARIABLE-OPTIONS-FAILED). Pick one of the listed options.