This page links to all of the LookML parameters that define fields.
There are several types of fields:
- Dimensionsrepresent a column in a table, or a computed value based on some sort of column manipulation or combination
- Dimension Groupsare only used with time-based data, and enable you to create many time-based dimensions at one time
- Measuresare similar to aggregate functions in SQL (for example,
COUNT
,SUM
,AVG
) and represent information about multiple rows - Filterscreate a filter-only field users can use to provide input to a templated filter or a conditional join
- Parameterscreate a filter-only field users can use to provide input to a Liquid
{% parameter %}
tag
Example usage
Hold the pointer over a parameter name to see a quick description. Click a parameter name to jump to its reference page.
When a parameter can be set to one of several specific options, the default value is listed first.
## STRUCTURAL PARAMETERS view : view_name { ( dimension | dimension_group | measure | filter | parameter ) : field_name { intervals : [ interval, interval, … ] timeframes : [ timeframe, timeframe, … ] # ACTION AND LINKING PARAMETERS action : { label : "Label to Appear in Action Menu" url : "url" icon_url : "url" form_url : "url" param : { name : "name string" value : "value string" } # Possibly more param definitions form_param : { name : "title" type : select | string | textarea label : "desired label name" required : yes | no default : "value string" option : { name : "name string" value : "value string" } # Possibly more option definitions } # Possibly more form_param definitions } drill_fields : [ field_or_set, field_or_set, ... ] tags : [ "string1", "string2", ... ] link : { label : "desired label name;" url : "desired_url" icon_url : "url_of_an_image_file" } # Possibly more link definitions # DISPLAY PARAMETERS alias : [ old_field_name, old_field_name, ... ] alpha_sort : yes | no description : "description string" group_label : "desired group label name" group_item_label : "label to use under the group label in the field picker" hidden : yes | no label : "desired label name" label_from_parameter : parameter_name order_by_field : dimension_name | dimension_group_name | measure_name style : classic | interval | integer | relational view_label : "desired label name" # FILTER PARAMETERS can_filter : yes | no case_sensitive : yes | no filters : [ dimension : "filter expression" , dimension : "filter expression" , ... ] skip_drill_filter : yes | no # FILTER SUGGESTION PARAMETERS allowed_value : { label : "desired label name" value : "looker filter expression" } # Possibly more allowed_value definitions bypass_suggest_restrictions : yes | no full_suggestions : yes | no suggest_dimension : dimension_name suggest_explore : explore_name suggest_persist_for : "N (seconds | minutes | hours)" suggestable : yes | no suggestions : [ "suggestion string", "suggestion string", "…" ] < # QUERY PARAMETERS allow_approximate_optimization : yes | no approximate : yes | no approximate_threshold : N convert_tz : yes | no datatype : epoch | timestamp | datetime | date | yyyymmdd fanout_on : repeated_record_name precision : N primary_key : yes | no required_access_grants : [ access_grant_name , access_grant_name , ...] required_fields : [ field_name, field_name, ... ] sql_distinct_key : SQL expression to define repeated entities ;; # VALUE AND FORMATTING PARAMETERS case : { when : { sql : SQL condition ;; label : "value" } # Possibly more when statements } default_value : "desired default value" direction : "row | column" end_location_field : dimension_name html : HTML expression using Liquid template elements ;; list_field : dimension_name percentile : Nth percentile sql : SQL expression to generate the field value ;; sql_end : SQL expression indicating the end time of a duration ;; sql_latitude : SQL expression to generate a latitude ;; sql_longitude : SQL expression to generate a longitude ;; sql_start : SQL expression indicating the start time of a duration ;; start_location_field : dimension_name synonyms : [ synonym1, synonym2, ... ] tiers : [ N, N, ... ] type : dimension_field_type # For a dimension field type : dimension_group_type # For a dimension_group field type : measure_field_type # For a measure field type : filter_field_type # For a filter field type : parameter_field_type # For a parameter field string_datatype : unicode # For a dimension field units : feet | kilometers | meters | miles | nautical_miles | yards value_format : "excel-style formatting string" value_format_name : format_name # VISUALIZATION PARAMETERS allow_fill : yes | no map_layer_name : name_of_map_layer } }
Parameter definitions
- D = Dimension
- DG = Dimension Group
- M = Measure
- F = Filter
- P = Parameter
{% parameter %}
tagparameter
Sorts a field by the values of another field
Supported for dimensions, dimension groups
Supported for measures
sql_always_where
is in use, but don't apply those limits to the suggestionsSELECT DISTINCT
query, or Looker can use the full logic of the Explore, including joins and sql_always_where
and access_filter
parameters.type: count
or type: count_distinct
, so that the measure can be used for aggregate awareness
type: count_distinct
. See the approximate
documentation page for a list of dialects that support this parameter.type: sum_distinct
or type: average_distinct
will be calculatedtype: percent_of_total
or type: running_total
is calculated when pivots are usedtype: percentile
or type: percentile_distinct
type: distance