label

LookML
Version

On this Page
Docs Menu

Go to View Parameter List

This page refers to the label parameter that is part of a view

label can also be used as part of a model, described here

label can also be used as part of an explore, described here

label can also be used as part of a dimension, dimension group, measure, or filter as described here

label can also be used as part of a reference line, described here

Usage

Definition

The label parameter lets you change how a view name will appear in the Field Picker. If not specified, the label defaults to the name of the view.

Example

In the Field Picker, make the view appear as Product ID Info for a view named product_id_information:

- view: product_id_information label: 'Product ID Info'

Common Challenges

label Has No Effect Other Than Changing The Field Picker Appearance

Views with labels are still referenced with the normal ${view_name.field_name} syntax in LookML. The label only affects the appearance of the Field Picker.

Things to Know

Avoid label When Possible By Naming Views Properly

If you know that you always want a view to appear in a certain manner to your business users, consider giving that name to the view. Then you won’t need to use label.

Typically label is only used when you want to:

  • 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.
Still have questions?
Go to Discourse - or - Email Support
Top