Field Parameters

LookML
Version

On this Page
Docs Menu

Go to Functional Reference for All Parameters

This page links to all of the LookML parameters that define fields.

There are several types of fields:

  • Dimensions represent a column in a table, or a computed value based on some sort of column manipulation or combination
  • Dimension Groups are only used with time-based data, and enable you to create many time-based dimensions at one time
  • Measures are similar to aggregate functions in SQL (e.g. COUNT, SUM, AVG) and represent information about multiple rows
  • Filters create a filter-only field users can use to provide input to a templated filter or a conditional join
  • ADDED4.22 Parameters create a filter-only field users can use to provide input to a liquid {% parameter %} tag

Example Usage

# STRUCTURAL PARAMETERS - (dimension | dimension_group | measure | filter): field_name timeframes: [timeframe, timeframe, …]   # ACTIONS AND LINKING PARAMETERS drill_fields: [field_or_set, field_or_set, …] tags: ['text_to_pass_1', 'text_to_pass_2', …] links: - label: 'desired label name' url: desired_url icon_url: url_of_an_image_file # Possibly more links definitions   # DISPLAY PARAMETERS alias: [old_field_name, old_field_name, …] alpha_sort: true | false description: 'description string' group_label: 'desired label name' hidden: true | false label: 'desired label name' label_from_parameter: parameter_name order_by_field: dimension_name style: classic | interval | integer | relational view_label: 'desired label name'   # FILTER PARAMETERS can_filter: true | false case_sensitive: true | false filters: dimension_name: 'looker filter expression' # Possibly more filters definitions skip_drill_filter: true | false   # FILTER SUGGESTION PARAMETERS allowed_values: - value: 'looker filter expression' label: 'desired label name' # Possibly more value definitions bypass_suggest_restrictions: true | false full_suggestions: true | false suggest_dimension: dimension_name suggest_explore: explore_name suggest_persist_for: N (seconds | minutes | hours) suggestable: true | false suggestions: ['suggestion string', 'suggestion string', …]   # QUERY PARAMETERS approximate: true | false approximate_threshold: N convert_tz: true | false datatype: epoch | timestamp | datetime | date | yyyymmdd fanout_on: repeated_record_name precision: N primary_key: true | false required_fields: [field_name, field_name, …] sql_distinct_key: SQL expression to define repeated entities   # VALUE AND FORMATTING PARAMETERS default_value: 'desired default value' direction: row | column end_location_field: field_name html: HTML expression using Liquid template elements list_field: dimension_name map_layer: name_of_map_layer percentile: Nth percentile sql: SQL expression to generate the field value sql_case: value: SQL condition value: SQL condition # Possibly more sql_case statements sql_latitude: SQL expression to generate a latitude sql_longitude: SQL expression to generate a longitude start_location_field: field_name tiers: [N, N, …] type: dimension_field_type # For a dimension type: time # For a dimension_group type: measure_field_type # For a measure type: filter_field_type # For a filter type: parameter_field_type # For a parameter units: feet | kilometers | meters | miles | nautical_miles | yards value_format: 'excel-style formatting string' value_format_name: format_name   # Possibly more dimension or measure declarations

Parameter Definitions

D = Dimension
DG = Dimension Group
M = Measure
F = Filter
P = Parameter

Parameter Name Valid Field Types Description
Structural Parameters
dimension D Create a dimension field
dimension_group DG Create several time-based dimensions at the same time
filter F Create a filter-only field for use in a templated filter or conditional join
measure M Create a measure field
parameter P ADDED4.22 Create a filter-only field users can use to provide input to a liquid {% parameter %} tag
timeframes DG Define the set of timeframe dimensions you want a dimension_group to produce
Action and Linking Parameters
drill_fields D DG M Declare the list of fields that will be displayed when the measure or dimension is drilled into
links D DG M Create links to other Looker and external content
tags D DG M F P ADDED4.16 Add text that can be passed to other applications to provide data about a field
Display Parameters
alias D DG M F P Allow saved URLs with old field names to remain functional after re-naming a field
alpha_sort D Make a sql_case sort its conditions alphabetically
description D DG M F P Add a description to the field users can see on hover
group_label D DG M F Group fields together within a view in the Field Picker
hidden D DG M F P Hide a field from the Explore UI
label D DG M F P Change the way a field name appears in the Field Picker
label_from_parameter D M ADDED4.22 Change the way a field name appears in the Field Picker based on the input to a parameter
order_by_field D M Sort a field by the values of another field
style D Change the way that tiers appear in the Looker UI for a type: tier dimension
view_label D DG M F P Change the fields that appear within a view in the Field Picker
Filter Parameters
can_filter D DG M Determine if a dimension or measure can be used as a filter
case_sensitive D F Determine if filters are case sensitive for a dimension
filter F Create a filter-only field for use in a templated filter
filters M Restrict a measure’s calculation based on dimension limitations
skip_drill_filter D Stop a dimension from being added to the filters when a measure is drilled into
Filter Suggestion Parameters
allowed_values P ADDED4.22 Specify the choices for a parameter
bypass_suggest_restrictions D DG F P Show suggestions to users when sql_always_where or access_filter_fields is in use, but don’t apply those limits to the suggestions
full_suggestions D DG F P Show suggestions to users when sql_always_where or access_filter_fields is in use, and do apply those limits to the suggestions
suggest_dimension D DG M F P Base the suggestions for a field on the values of a different dimension
suggest_explore D DG M F P Base the suggestions for a field on the values of a different explore
suggest_persist_for D F P Change the cache settings for Looker filter suggestions
suggestable D DG M F P Enable or disable suggestions for a field
suggestions D F P Declare a list of values that will be used for a field’s suggestions
Query Parameters
approximate M Perform an approximate count for type: count_distinct measures, for Redshift or BigQuery
approximate_threshold M Set the count at which BigQuery switches from an exact count distinct to an approximate count distinct
convert_tz D DG M F P Disable automatic timezone conversion for a dimension_group
datatype D DG F Specify the type of time data you are providing to a dimension_group
fanout_on D DG M Enable access to Google BigQuery repeated fields
precision M ADDED4.22Specify the number of decimal places to use when making calculations for Looker symmetric aggregates
primary_key D Declare a dimension as the primary key of a view
required_fields D M F P Require that additional fields are added to a query when a field is chosen
sql_distinct_key M Define the unique entities over which a type: sum_distinct or type: average_distinct measure will be calculated
Value and Formatting Parameters
default_value F P Specifies a default value for filter fields
direction M Determine the direction that type: percent_of_total or type: running_total measures are calculated when pivots are used
end_location_field D Define the field that contains the end location for a type: distance field
html D DG M Modify the HTML output of a field using liquid templating
list_field M Declare the dimension from which a type: list measure will be calculated
percentile M ADDED4.12 Specify the fractional value (the Nth percentile) for a type: percentile or type: percentile_distinct measure
sql D DG M F Determine how a field will be calculated
sql_case D Create a discrete set of values a dimension can have determined by SQL conditions
sql_latitude D Define the latitude of a type: location dimension
sql_longitude D Define the longitude of a type: location dimension
start_location_field D Define the field that contains the start location for a type: distance field
tiers D Define the tiers for a type: tier dimension
type (for dimension, filter, or parameter) D F P Specify the type of dimension, filter, or parameter
type (for dimension group) DG Dimension groups always use type: time
type (for measure) M Specify the type of measure
units D The unit to use for type: distance fields
value_format D M Format the output of a field using Excel style options
value_format_name D M Format the output of a field using a built-in or custom format
Visualization Parameters
allow_fill D DG Determine if dimension filling is allowed for a dimension
map_layer D Specifies a mapping from a data value to a geographic region that you’ve defined on a built-in or custom map
Parameters to Avoid
decimals D M AVOID AS OF3.38 Replaced by value_format
format D M AVOID AS OF3.16 Replaced by value_format
Still have questions?
Go to Discourse - or - Email Support
Top