Stay organized with collectionsSave and categorize content based on your preferences.
Amodel filespecifies a database connection, defines the set ofExploresthat 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.lkmlfile 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 anyexploredeclarations, 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 PARAMETERSinclude:"filename_or_pattern"## Possibly more include declarationsexplore:explore_name{ # Desired explore parameters (described onExplore Parameterspage)}## Possibly more explore declarationsaccess_grant:access_grant_name{user_attribute:user_attribute_nameallowed_values: ["value_1","value_2", ...]}## Possibly more access_grant declarationstest:test_name{explore_source:explore_name{ # Desired subparameters (described ontestpage)
}assert:assert_statement{expression:Looker expression;;} # Possibly more assert declarations}## Possibly more test declarations
## DISPLAY PARAMETERSlabel:"desired label"## FILTER PARAMETERScase_sensitive:yes|no## QUERY PARAMETERSconnection:"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 declarationsfiscal_month_offset:Npersist_for:"N (seconds | minutes | hours)"persist_with:datagroup_nameweek_start_day:monday|tuesday|wednesday|thursday|friday|saturday|sunday## VISUALIZATION AND FORMATTING PARAMETERSmap_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 declarationsnamed_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 approveduser attributevalue. This parameter has theuser_attributeandallowed_valuessubparameters.
Creates a data test to verify your model's logic. The project settings include an option torequire 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 theexplore_sourceandassertsubparameters.
[[["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-09-04 UTC."],[],[],null,["# Model parameters\n\n\u003cbr /\u003e\n\nA [model file](/looker/docs/model-and-view-files#model_files) specifies a database connection, defines the set of [Explores](/looker/docs/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/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/reference/param-model-include:\"filename_or_pattern\"\n## Possibly more include declarations\n\n/looker/docs/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/reference/param-model-access-grant: access_grant_name{\n /looker/docs/reference/param-model-access-grant: user_attribute_name\n /looker/docs/reference/param-model-access-grant: [\"value_1\", \"value_2\", ...]\n}\n## Possibly more access_grant declarations\n\n/looker/docs/reference/param-model-test: test_name{\n /looker/docs/reference/param-model-test: explore_name {\n # Desired subparameters (described on `test` page)\n }\n /looker/docs/reference/param-model-test: assert_statement {\n /looker/docs/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/reference/param-model-label: \"desired label\"\n\n## FILTER PARAMETERS\n/looker/docs/reference/param-model-case-sensitive: yes | no\n\n## QUERY PARAMETERS\n/looker/docs/reference/param-model-connection: \"connection_name\"\n/looker/docs/reference/param-model-datagroup: datagroup_name{\n /looker/docs/reference/param-model-datagroup: \"desired label\"\n /looker/docs/reference/param-model-datagroup: \"desired description\"\n /looker/docs/reference/param-model-datagroup#max_cache_age: \"N (minutes | hours | days)\"\n /looker/docs/reference/param-model-datagroup#sql_trigger: SQL query ;;\n}\n## Possibly more datagroup declarations\n/looker/docs/reference/param-model-fiscal-month-offset: N\n/looker/docs/reference/param-model-persist-for: \"N (seconds | minutes | hours)\"\n/looker/docs/reference/param-model-persist-with: datagroup_name\n/looker/docs/reference/param-model-week-start-day: monday | tuesday | wednesday | thursday | friday | saturday | sunday\n\n## VISUALIZATION AND FORMATTING PARAMETERS\n/looker/docs/reference/param-model-map-layer: map_name{\n /looker/docs/reference/param-model-map-layer: \"URL to JSON extents file\"\n /looker/docs/reference/param-model-map-layer: \"Name of TopoJSON object\"\n /looker/docs/reference/param-model-map-layer: \"TopoJSON or GeoJSON filename\" # or use the url subparameter\n /looker/docs/reference/param-model-map-layer: topojson | vector_tile_region\n /looker/docs/reference/param-model-map-layer: \"desired label\"\n /looker/docs/reference/param-model-map-layer: number indicating max zoom\n /looker/docs/reference/param-model-map-layer: number indicating min zoom\n /looker/docs/reference/param-model-map-layer: Preferred geographic projection\n /looker/docs/reference/param-model-map-layer: \"TopoJSON property\"\n /looker/docs/reference/param-model-map-layer: \"Label for TopoJSON property\"\n /looker/docs/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/reference/param-model-named-value-format: desired_name {\n /looker/docs/reference/param-model-named-value-format: \"excel formatting string\"\n /looker/docs/reference/param-model-named-value-format: yes | no\n }\n## Possibly more named value format declarations\n```\n\nParameter definitions\n---------------------"]]