Model Parameters


On this Page
Docs Menu

Model files define explores and their relationships to other views.

A “model” references a combination of related explores and dashboards. Unlike other LookML elements, a model is not declared with a model parameter. Instead, any file placed in the MODELS section of the Looker IDE (also known as the Develop page) defines a model. The model name is taken from the filename, and must be unique across your instance, even within different projects.

A model file typically contains any explore declarations, along with a host of model level settings.

This page links to the model-level LookML parameters. They are typically written at the top of the model file and should not be nested within other parameters.

Example Usage

New Feature! Hover over the parameter names in the code example below to see quick descriptions, and click on parameter names to jump to that page.

When a parameter can be set to one of several specific options, the default value is listed first.

explore: explore_name {
  # Desired explore parameters (described on Explore Parameters page)
# Possibly more explore declarations

include: "filename_or_pattern"
# Possibly more include declarations

label: "Label I Want"

case_sensitive: yes | no

connection: "connection_name"
persist_for: "N (seconds | minutes | hours)"
week_start_day: monday | tuesday | wednesday | thursday | friday | saturday | sunday

map_layer: map_name {
  feature_key: "string"
  format: topojson | vector_tile_region
  label: "string"
  projection: airy # or one of many other choices
  property_key: "string"
  property_label_key: "string"
  url: "string"
# Possibly more map layers

named_value_format: desired_name {
  value_format: "excel formatting string"
# Possibly more named value formats

Parameter Definitions

Parameter Name Description
Structural Parameters
explore Expose a view in the Explore menu. For more information about explores and their parameters, see the Explore Parameter Reference page.
include Add files to a model
Display Parameters
label (for model) Change the way a model appears in the Explore menu
Filter Parameters
case_sensitive (for model) Specify whether filters are case sensitive for a model
Query Parameters
connection Change the database connection for a model
persist_for (for model) Change the cache settings for a model
week_start_day Specify the day of week that week-related dimensions should start on
Visualization and Formatting Parameters
map_layer (for model) NEW LOOKML Create custom maps to be used with map_layer_name
map_layers OLD LOOKML Create custom maps to be used with the field-level map_layer parameter
named_value_format NEW LOOKML Create a custom value format to be used with value_format_name
value_formats OLD LOOKML Create custom value formats to be used with value_format_name
Parameters to Avoid
scoping REMOVED3.52 No longer required
template AVOID AS OF3.30 Specify the template engine to be used with html parameters
Still have questions?
Go to Discourse - or - Email Support