suggest_dimension Stay organized with collections Save and categorize content based on your preferences.
Usage
view: view_name { dimension: field_name { suggest_dimension:dimension_name }}Hierarchy suggest_dimension | Possible Field Types Dimension, Dimension Group, Measure, Filter, ParameterAccepts A fieldname in the current view or viewname.fieldnameSpecial Rules To refer to a field in another view, use viewname.fieldname where viewname is a view joined in the Explore |
Definition
This parameter changes how Looker generates suggestions for afilter field or adimension oftype: string when someone uses that field to filter a query.
Looker typically generates these suggestions by executing the following query on the filter field:
SELECT DISTINCT <field name> FROM <table> LIMIT 1000
If the field is in a large table, this query can be too slow or create too large a database load.
By usingsuggest_dimension, you can make Looker query an alternative dimension for the suggestion values. If that dimension is defined in a different Explore,suggest_explore tells Looker where to find it. In this case, include both the view name where the dimension is defined and the dimension name in the formatview_name.field_name. In addition, ensure that the view isjoined to the Explore that is specified in thesuggest_explore parameter.
If the dimension is defined in the current view,suggest_explore is not required.
Examples
In this example, instead of looking through a huge list of user names from theevent Explore, we've told Looker to query the names from auser Explore instead:
dimension: event_user_name { type: string sql: ${TABLE}.event_user_name ;; suggest_explore: user suggest_dimension: user.name}In this example, rather than a different Explore, the suggestion uses a dimension in another view joined to the same Explore:
dimension: event_company_name { type: string sql: ${TABLE}.event_company_name ;; suggest_dimension: company.name}Things to know
Fields withsuggest_dimension will not be affected bylinked filters in dashboards.
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.