label (for views)

This page refers to thelabel parameter that is part of aview.

label can also be used as part of a model, described on theModel parameters documentation page.

label can also be used as part of an Explore, described on thelabel (for Explores) parameter documentation page.

label can also be used as part of a field, described on thelabel (for fields) parameter documentation page.

label can also be used as part of a reference line, described on theDashboard reference line parameters documentation page.

Usage

view: view_name {  label:"desired label for the view"}
Hierarchy
label
Default Value
The view name

Accepts
A string

Definition

Thelabel parameter helps make Explores more user-friendly by allowing you to set the view names that appear in thefield picker. If not specified, the label defaults to the name of the view.

Example

In the field picker, make the view appear asProduct ID Info for a view namedproduct_id_information:

view: product_id_information {  label: "Product ID Info"}

Things to consider

Alabel does not change LookML references

The label affects only the displayed name of the view in the Explore; the label does not affect how you refer to the view in LookML. Views with labels are still referenced with the normal${view_name.field_name} syntax in your LookML files.

Alabel can affect multiple Explores

Unlikeview_label (for Explores) andview_label (for joins), this parameter affects all Explores that use the view.

Alabel isn't necessary if you name views thoughtfully

A view does not need alabel parameter if the name already appears and is formatted how you want your users to see it in the field picker. If you know how you want a view to appear to your users, you can often consider this when naming it, avoiding the need to uselabel.

Typicallylabel is only used when you want to perform one of the following tasks:

  • Change the way that a view name is formatted. For example, you can make the view name "abc_info" appear as "ABC Info" instead of "Abc Info"
  • Create two different views with different dimensions and measures that are based on the same SQL table

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-22 UTC.