Stay organized with collections
Save and categorize content based on your preferences.
A model file specifies a database connection, defines the set of Explores that use that connection, and defines the Explores' relationships to other views. Unlike other LookML elements, a model is not declared with a specific "model" parameter. Instead, a LookML developer defines a model by creating a LookML project file that has the .model.lkml file extension. 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 number 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 shouldn't be nested within other parameters.
Example usage
Hold the pointer over a parameter name to see a quick description. Click a parameter to visit its reference page. When a parameter can be set to one of several specific options, the default value is listed first.
## STRUCTURAL PARAMETERS
include:"filename_or_pattern"
## Possibly more include declarations
explore: explore_name{
# Desired explore parameters (described on Explore Parameters page)
}
## Possibly more explore declarations
access_grant: access_grant_name{user_attribute: user_attribute_nameallowed_values: ["value_1", "value_2", ...]}
## Possibly more access_grant declarations
test: test_name{explore_source: explore_name{
# Desired subparameters (described on test page)
}assert: assert_statement{expression:Looker expression ;;}
# Possibly more assert declarations
}
## Possibly more test declarations
## DISPLAY PARAMETERS
label:"desired label"
## FILTER PARAMETERS
case_sensitive:yes | no
## QUERY PARAMETERS
connection:"connection_name"datagroup: datagroup_name{label: "desired label"description: "desired description"max_cache_age: "N (minutes | hours | days)"sql_trigger: SQL query ;;}
## Possibly more datagroup declarations
fiscal_month_offset:Npersist_for:"N (seconds | minutes | hours)"persist_with:datagroup_nameweek_start_day: monday | tuesday | wednesday | thursday | friday | saturday | sunday
## VISUALIZATION AND FORMATTING PARAMETERS
map_layer: map_name{extents_json_url: "URL to JSON extents file"feature_key: "Name of TopoJSON object"file: "TopoJSON or GeoJSON filename" # or use the url subparameter
format: topojson | vector_tile_regionlabel: "desired label"max_zoom_level: number indicating max zoommin_zoom_level: number indicating min zoomprojection: Preferred geographic projectionproperty_key: "TopoJSON property"property_label_key: "Label for TopoJSON property"url: "URL that contains map file" # or use the file subparameter
}
## Possibly more map layer declarations
named_value_format: desired_name {value_format: "excel formatting string"strict_value_format:yes | no }
## Possibly more named value format declarations
Creates an access grant that limits access of LookML structures to only those users who are assigned an approved user attribute value. This parameter has the user_attribute and allowed_values subparameters.
Creates a data test to verify your model's logic. The project settings include an option to require data tests. When this is enabled for a project, developers on the project must run data tests before deploying their changes to production. This parameter has the explore_source and assert subparameters.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[],[],null,["# Model parameters\n\n\u003cbr /\u003e\n\nA [model file](/looker/docs/2512/model-and-view-files#model_files) specifies a database connection, defines the set of [Explores](/looker/docs/2512/lookml-terms-and-concepts#explore) that use that connection, and defines the Explores' relationships to other views. Unlike other LookML elements, a model is not declared with a specific \"model\" parameter. Instead, a LookML developer defines a model by creating a LookML project file that has the `.model.lkml` file extension. The model name is taken from the filename and must be unique across your instance, even within different projects.\n\nA model file typically contains any [`explore`](/looker/docs/2512/reference/param-explore) declarations, along with a number of model-level settings.\n\nThis page links to the model-level LookML parameters. They are typically written at the top of the model file and shouldn't be nested within other parameters.\n\nExample usage\n-------------\n\nHold the pointer over a parameter name to see a quick description. Click a parameter to visit its reference page. When a parameter can be set to one of several specific options, the default value is listed first. \n\n```\n## STRUCTURAL PARAMETERS\n/looker/docs/2512/reference/param-model-include:\"filename_or_pattern\"\n## Possibly more include declarations\n\n/looker/docs/2512/reference/param-explore-explore: explore_name {\n # Desired explore parameters (described on Explore Parameters page)\n}\n## Possibly more explore declarations\n\n/looker/docs/2512/reference/param-model-access-grant: access_grant_name{\n /looker/docs/2512/reference/param-model-access-grant: user_attribute_name\n /looker/docs/2512/reference/param-model-access-grant: [\"value_1\", \"value_2\", ...]\n}\n## Possibly more access_grant declarations\n\n/looker/docs/2512/reference/param-model-test: test_name{\n /looker/docs/2512/reference/param-model-test: explore_name {\n # Desired subparameters (described on `test` page)\n }\n /looker/docs/2512/reference/param-model-test: assert_statement {\n /looker/docs/2512/reference/param-model-test:Looker expression ;;\n }\n # Possibly more assert declarations\n}\n## Possibly more test declarations\n\n## DISPLAY PARAMETERS\n/looker/docs/2512/reference/param-model-label: \"desired label\"\n\n## FILTER PARAMETERS\n/looker/docs/2512/reference/param-model-case-sensitive: yes | no\n\n## QUERY PARAMETERS\n/looker/docs/2512/reference/param-model-connection: \"connection_name\"\n/looker/docs/2512/reference/param-model-datagroup: datagroup_name{\n /looker/docs/2512/reference/param-model-datagroup: \"desired label\"\n /looker/docs/2512/reference/param-model-datagroup: \"desired description\"\n /looker/docs/2512/reference/param-model-datagroup#max_cache_age: \"N (minutes | hours | days)\"\n /looker/docs/2512/reference/param-model-datagroup#sql_trigger: SQL query ;;\n}\n## Possibly more datagroup declarations\n/looker/docs/2512/reference/param-model-fiscal-month-offset: N\n/looker/docs/2512/reference/param-model-persist-for: \"N (seconds | minutes | hours)\"\n/looker/docs/2512/reference/param-model-persist-with: datagroup_name\n/looker/docs/2512/reference/param-model-week-start-day: monday | tuesday | wednesday | thursday | friday | saturday | sunday\n\n## VISUALIZATION AND FORMATTING PARAMETERS\n/looker/docs/2512/reference/param-model-map-layer: map_name{\n /looker/docs/2512/reference/param-model-map-layer: \"URL to JSON extents file\"\n /looker/docs/2512/reference/param-model-map-layer: \"Name of TopoJSON object\"\n /looker/docs/2512/reference/param-model-map-layer: \"TopoJSON or GeoJSON filename\" # or use the url subparameter\n /looker/docs/2512/reference/param-model-map-layer: topojson | vector_tile_region\n /looker/docs/2512/reference/param-model-map-layer: \"desired label\"\n /looker/docs/2512/reference/param-model-map-layer: number indicating max zoom\n /looker/docs/2512/reference/param-model-map-layer: number indicating min zoom\n /looker/docs/2512/reference/param-model-map-layer: Preferred geographic projection\n /looker/docs/2512/reference/param-model-map-layer: \"TopoJSON property\"\n /looker/docs/2512/reference/param-model-map-layer: \"Label for TopoJSON property\"\n /looker/docs/2512/reference/param-model-map-layer: \"URL that contains map file\" # or use the file subparameter\n}\n## Possibly more map layer declarations\n\n/looker/docs/2512/reference/param-model-named-value-format: desired_name {\n /looker/docs/2512/reference/param-model-named-value-format: \"excel formatting string\"\n /looker/docs/2512/reference/param-model-named-value-format: yes | no\n }\n## Possibly more named value format declarations\n```\n\nParameter definitions\n---------------------"]]