How are LookML dashboards validated (LookML validator)?

Knowledge Drop

Last tested: Oct 13, 2020
 

Before we get into how LookML dashboards are validated, here's how the LookML validator works at a high level (documentation).

The LookML Validator scans only LookML files that have been updated since the last LookML validation, or files that are affected by updates:

  • If a model-level setting changes, everything is revalidated.
  • If a view changes, only the Explores where it is used are revalidated.
  • If an Explore changes, only that Explore is revalidated.

When we validate our LookML, the validation is done on a model-by-model basis. Meaning if we have four model files and we only made a change to one of them, then only the explores/views/LookML dashboards associated with that one model file will be validated.

Now to LookML dashboards. When we load a LookML dashboard for the first time, we need to validate the dashboard to be able to render them. That means when we're accessing a LookML dashboard for the first time, it has to validate all the models/explores that it references.

LookML dashboard validations are also cached which means that once the dashboard has been validated once, it won't be validated again unless there's a change made.

Performance note:

Including a massive amount of LookML dashboards at once can lead to performance issues, especially if the include parameter in the model file is using the include: * syntax (documentation).

Since we need to validate LookML dashboards to be able to render them when accessing a dashboard, it has to validate the model. If we are including all LookML dashboards in this model file, Looker has to go and validates each dashboard as well. So if we bulk add 100+ LookML dashboards at once, this can overload the validator and crash the instance.

To avoid having too many LookML dashboards loaded into a single model file, chunking it into groups of 10-20 dashboards per model file should help with this issue.

This content is subject to limited support.                

Version history
Last update:
‎07-07-2021 01:12 PM
Updated by: