LookML quick reference

Stay organized with collections Save and categorize content based on your preferences.

This page describes the LookML parameters that you can use in a LookML project. You can read more about each parameter by going to the appropriate reference page. Visualization-specific LookML parameters used in dashboard files are documented on the Dashboard element parameter documentation pages.

Model LookML Jump to example Go to reference page
Explore LookML Jump to example Go to reference page
Join LookML Jump to example Go to reference page
View LookML Jump to example Go to reference page
Field LookML Jump to example Go to reference page
Dashboard LookML Jump to example Go to reference page
Project Manifest LookML Jump to example Go to reference page

Model file

label: "desired label name"
connection: "connection_name"
include: "filename_or_pattern"
# Possibly more include declarations

fiscal_month_offset: N
persist_for: "N (seconds | minutes | hours)"
persist_with: datagroup_name
case_sensitive: yes | no
week_start_day: monday | tuesday | wednesday | thursday | friday | saturday | sunday
named_value_format: desired_format_name {
  value_format: "excel-style formatting string"
  strict_value_format: yes | no
}
# Possibly more named value formats

map_layer: identifier {
  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_region
  label: "desired label"
  max_zoom_level: number indicating max zoom
  min_zoom_level: number indicating min zoom
  projection: Preferred geographic projection
  property_key: "TopoJSON property"
  property_label_key: "Label for TopoJSON property"
  url: "URL that contains map file" # or use the file subparameter
}

datagroup: datagroup_name {
  label: "desired label"
  description: "description string"
  sql_trigger: SQL query ;;
  max_cache_age: "N (minutes | hours | days)"
}
# Possibly more datagroups

access_grant: access_grant_name {
  user_attribute: user_attribute_name
  allowed_values: ["value_1", "value_2", ...]
}
# Possibly more access_grants

test: test_name {
  explore_source: explore_name {
    # Desired subparameters
  }
  assert: assert_statement {
    expression: Looker expression ;;
  }
}
# Possibly more test declarations

explore: explore_name {
  description: "description string"
  label: "desired label name"
  group_label: "label to use as a heading in the Explore menu"
  view_label: "field picker heading to use for the Explore's fields"
  extends: [explore_name, explore_name, ...]
  extension: required
  symmetric_aggregates: yes | no
  hidden: yes | no
  fields: [field_or_set, field_or_set, ...]
  sql_always_where: SQL WHERE condition ;;
  required_access_grants: [access_grant_name, access_grant_name, ...]
  persist_for: "N (seconds | minutes | hours)"
  persist_with: datagroup_name
  from: view_name
  view_name: view_name
  case_sensitive: true | false
  sql_table_name: table_name ;;
  cancel_grouping_fields: [fully_scoped_field, fully_scoped_field, ...]

  always_filter: {
    filters: [field_name: "looker filter expression", field_name: "looker filter expression", ...]
  }

  conditionally_filter: {
    filters: [field_name: "looker filter expression", field_name: "looker filter expression", ...]
    unless: [field_or_set, field_or_set, ...]
  }

  access_filter: {
    field: fully_scoped_field
    user_attribute: user_attribute_name
  }

  always_join: [view_name, view_name, ...]

  join: view_name {
    type: left_outer | full_outer | inner | cross
    relationship: one_to_one | many_to_one | one_to_many | many_to_many
    from: view_name
    sql_table_name: table_name ;;
    view_label: "desired label name"
    fields: [field_or_set, field_or_set, ...]
    required_joins: [view_name, view_name, ...]
    foreign_key: dimension_name
    sql_on: SQL ON clause ;;
    required_access_grants: [access_grant_name, access_grant_name, ...]
  }
  # Possibly more join declarations
  aggregate_table: table_name {
    query: {
      # Desired query subparameters
    }
    materialization: {
      # Desired materialization subparameter
    }
  }
  # Possibly more aggregate_table declarations
}
# Possibly more explore declarations

explore: +explore_name {
  final: yes
}

View file


test: test_name {
  explore_source: explore_name {
    # Desired subparameters
  }
  assert: assert_statement {
    expression: Looker expression ;;
  }
}
# Possibly more test declarations

view: view_name {
  sql_table_name: table_name ;;
  suggestions: yes | no
  extends: [view_name, view_name, ...]
  extension: required
  required_access_grants: [access_grant_name, access_grant_name, ...]

  derived_table: {
    explore_source: explore_name {
      bind_all_filters: yes
      bind_filters: {
        from_field: field_name
        to_field: field_name
      }
      column: column_name {
        field: field_name
      }
      derived_column: column_name {
        sql: SQL query ;;
      }
      expressions_custom_filter: custom_filter_expression ;;
      filters: [field_name: "looker filter expression", field_name: "looker filter expression", ...]
      limit: number
      sorts: [field_name: asc | desc]
      timezone: "timezone_name"
    }
    cluster_keys: ["column_name", "column_name", "..."]
    create_process: {
      sql_step: SQL query ;;
    }
    datagroup_trigger: datagroup_name
    distribution: "column_name"
    distribution_style: all | even
    increment_key: "column_name"
    increment_offset: N
    indexes: ["column_name", "column_name", "..."]
    partition_keys: ["column_name", "column_name", "..."]
    persist_for: "N (seconds | minutes | hours)"
    publish_as_db_view: yes | no
    sortkeys: ["column_name", "column_name", "..."]
    sql: SQL query ;;
    sql_create: {
      SQL query ;;
    }
    sql_trigger_value: SQL query ;;
    table_compression: GZIP | SNAPPY
    table_format: PARQUET | ORC | AVRO | JSON | TEXTFILE
  }

  set: set_name {
    fields: [field_or_set, field_or_set, ...]
    # Possibly more set declarations
  }

  (dimension | dimension_group | measure | filter | parameter): field_name {
    label: "desired label name"
    label_from_parameter: parameter_name
    view_label: "desired label name"
    group_label: "label used to group dimensions in the field picker"
    group_item_label: "label to use for the field under its group label in the field picker"
    description: "description string"
    hidden: yes | no
    alias: [old_field_name, old_field_name, ...]
    value_format: "excel-style formatting string"
    value_format_name: format_name
    html: HTML expression using Liquid template elements ;;
    sql: SQL expression to generate the field value ;;
    required_fields: [field_name, field_name, ...]
    drill_fields: [field_or_set, field_or_set, ...]
    can_filter: yes | no
    fanout_on: repeated_record_name
    tags: ["string1", "string2", ...]
    type: field_type
    primary_key: yes | no
    case: {
      when: {
        sql: SQL condition ;;
        label: "value"
      }
      # Possibly more when statements
    }
    alpha_sort: yes | no
    tiers: [N, N, ...]
    style: classic | interval | integer | relational
    sql_latitude: SQL expression to generate a latitude ;;
    sql_longitude: SQL expression to generate a longitude ;;
    suggestable: yes | no
    suggest_persist_for: "N (seconds | minutes | hours)"
    suggest_dimension: dimension_name
    suggest_explore: explore_name
    suggestions: ["suggestion string", "suggestion string", "..."]
    allowed_value: {
      label: "desired label name"
      value: "looker filter expression"
    }
    # Possibly more allowed_value definitions
    required_access_grants: [access_grant_name, access_grant_name, ...]
    bypass_suggest_restrictions: yes | no
    full_suggestions: yes | no
    skip_drill_filter: yes | no
    case_sensitive: yes | no
    order_by_field: dimension_name
    map_layer_name: name_of_map_layer
    link: {
      label: "desired label name;"
      url: "desired_url"
      icon_url: "url_of_an_ico_file"
    }
    # Possibly more links

    timeframes: [timeframe, timeframe, ...]
    convert_tz: yes | no
    datatype: epoch | timestamp | datetime | date | yyyymmdd
    intervals: [interval, interval, ...]
    sql_start: SQL expression for start time of duration ;;
    sql_end: SQL expression for end time of duration ;;
    direction: "row | column"
    approximate: yes | no
    approximate_threshold: N
    sql_distinct_key: SQL expression to define repeated entities ;;
    list_field: dimension_name
    percentile: Nth percentile
    precision: N

    filters: [field_name: "looker filter expression", field_name: "looker filter expression", ...]

    default_value: "desired default value"
  }
  # Possibly more dimension or measure declarations
}

view: +view_name {
  final: yes
}

Dashboard file

See the Dashboard element parameters documentation page for information about the LookML parameters used with each visualization type.

- dashboard: dashboard_name
  title: "desired dashboard title"
  description: "desired dashboard description"
  extends: name_of_dashboard_being_extended
  extension: required
  layout: tile | static | grid | newspaper
  rows:
    - elements: [element_name, element_name, ...]
      height: N
  tile_size: N
  width: N
  refresh: N (seconds | minutes | hours | days)
  auto_run: true | false

  # DASHBOARD FILTER PARAMETERS
  filters:
  - name: filter_name
    title: "desired filter title"
    type: field_filter | number_filter | date_filter | string_filter
    model: model_name
    explore: explore_name
    field: view_name.field_name
    default_value: Looker filter expression
    allow_multiple_values: true | false
    required: true | false
    listens_to_filters:
    - filter_name
      field: view_name.field_name

  # EMBEDDED DASHBOARD PARAMETERS
  embed_style:
    background_color: "css_color"
    show_title: true | false
    title_color: "css_color"
    show_filters_bar: true | false
    tile_background_color: "css_color"
    tile_text_color: "css_color"

  # ELEMENTS PARAMETERS
  elements:
  # One or more element declarations

Project manifest file


project_name: "project_name"

local_dependency: {
  project: "project_name"
  override_constant: constant_name {
    value: "desired string value"
  }
}
# Possibly more local_dependency statements

remote_dependency: remote_dependency_name {
  url: "remote_dependency_url"
  ref: "commit_sha"
  override_constant: constant_name {
    value: "desired string value"
  }
}
# Possibly more remote_dependency statements

localization_settings: {
  default_locale: default_locale_name
  localization_level: permissive | strict
}

constant: constant_name {
  value: "desired string value"
  export: none | override_optional | override_required
}
# Possibly more constant statements

application: extension-app {
  label: "Application Label"
  file: "application_file_path"
  url: "application_url"
  entitlements: {
    local_storage: yes | no
    navigation: yes | no
    new_window: yes | no
    allow_forms: yes | no
    allow_same_origin: yes | no
    core_api_methods: ["api_method_1", "api_method_2", "api_method_3"]
    external_api_urls: ["external_api_url_1", "external_api_url_2", "external_api_url_3"]
    oauth2_urls: ["oauth2_url_1", "oauth2_url_2", "oauth2_url_3"]
  }
}
# Possibly more application statements