This page refers to the
tags
parameter that is part of a field.
tags
can also be used as part of an Explore, described on thetags
(for Explores) parameter documentation page.
Usage
dimension: field_name {
tags : ["string1","string2", …]
}
}
Hierarchytags |
Possible Field TypesDimension, Dimension Group, Measure, Filter, ParameterAcceptsSquare brackets containing a comma-separated list of strings |
Definition
The tags
parameter lets you add text strings to a field. These strings are not used by the Looker model but can be passed to other applications using:
- Integrated services enabled on the Action panel. Some services require one or more fields containing certain types of data, such as a phone number. Use the
tags
parameter to identify those fields that can be used by a service. - API calls. For API calls,
tags
can be useful for providing arbitrary metadata about a field to an outside application.
Examples
Adds two text tags, “Important Data” and “Customer Data”, to the customer_count_distinct
measure.
Using tags
with integrated services
Some integrated services in the Action panel require that you identify a specific field in your LookML model using the tags
parameter. This will be a field or fields that provide identifying data to that service.
For example, the Twilio Send Message service sends a message to phone numbers. It requires a query that includes a phone number field, and that you identify the phone number field in LookML using tags: ["phone"]
. Looker uses the tags
parameter to identify which field in the query contains phone numbers that should be sent to Twilio. Your LookML for the phone number field could look like this:
measure: phone {
tags: ["phone"]
type: string
sql: ${TABLE}.phone ;;
}
Some integrated services can be called from a row in an Explore, a dashboard tile, or a Look. In this case, Looker marks the tagged field with three dots to indicate that there is a drop-down list. Click on the three dots to see the actions available for that link:
Other integrated services can be used when delivering Looker content to various destinations. If a query’s results contain the required tagged fields for an enabled service, then the Where should this data go? field of the Scheduler displays the service and the required field. Looker also displays the service as a destination if the service does not require a tagged field.
For more information about using the integrated services, see the How to Deliver Data section of the Actions page.
The following list shows all services that are integrated with Looker and can be enabled via the Action panel. The Tags For This Action column lists any tags required by that integrated service.