User Guide Help Center Documentation User Forums Training
Looker
Changing Filter Suggestions

This page provides an overview of LookML parameters that affect filter suggestions. Each parameter listed has a short description of its function, an example that shows the effect of adding that parameter, and a link to the reference page for that parameter.

This page includes the following sections:

Default Behavior

By default, when a user enters a filter value for a dimension with type: string, Looker suggests options that match what the user enters. These filter suggestions are created using a SELECT DISTINCT query on the dimension, so only values that are existing data for that field are suggested:

Enabling or Disabling Filter Suggestions

This section describes LookML parameters that let you enable or disable filter suggestions. It includes the following parameters:

suggestable (Field)

suggestable lets you disable suggestions for a dimension or filter when someone uses that field to filter a report. The default value of suggestable is true, so Looker provides suggestions to the user when possible. If you set suggestable to false instead, Looker does not make suggestions.

Before

LookML

After

For more information, see this parameter’s reference page.

suggestions (View)

suggestions lets you to disable suggestions for all the dimensions of a view when someone uses one of those dimensions to filter a report. The default value of suggestions is true, so Looker provides suggestions to the user when possible. If you set suggestions to false instead, Looker does not provide suggestions.

Before

LookML

After

For more information, see this parameter’s reference page.

Filter Suggestion Values

This section describes LookML parameters that let you set or restrict the values shown in filter suggestions. It includes the following parameters:

allowed_value (Field)

allowed_value works with the parameter LookML parameter. If a Looker developer provides a parameter filter-only field, the values entered or selected by users can be referenced using a {% parameter %} liquid variable. Optionally, you can use allowed_value to define a list of values a user can choose for that parameter field.

allowed_value has two subparameters, label and value. The label subparameter specifies the options the user will see in the filter suggestions. The value subparameter contains the values that are passed to the {% parameter %} liquid variable.

Before

LookML

after

For more information, see this section of the parameter reference page.

bypass_suggest_restrictions (Field)

bypass_suggest_restrictions enables filter suggestions in configurations where they would be disabled or limited by default.

If sql_always_where or access_filter is used to restrict the rows that users can see, then Looker restricts the filter suggestions to just the values in the rows the user can access. Thus, Looker ensures that a user won’t see filter suggestions only gathered from rows that the user is not allowed to view.

If you are certain that there are no possible values in a particular dimension or filter field that would reveal sensitive information, you can reinstate the full set of possible filter suggestions using bypass_suggest_restrictions.

Before

LookML

After

For more information, see this parameter’s reference page.

case (Field)

case enables you to bucket a dimension’s results with case logic. This impacts filter suggestions because only the values defined in the case statement are shown as filter suggestions for that dimension.

The suggestions presented to a user for a dimension using case will not be restricted when using full_suggestions. Any option that you include in a case parameter will be visible to all users.

LookML

after

For more information, see this parameter’s reference page.

full_suggestions (Field)

full_suggestions disables filter suggestions for a dimension.

A common use case is when using sql_always_where or access_filter on an explore. Looker applies those parameters’ restrictions to the filter suggestions it makes to prevents users from seeing a filter suggestion that does not apply to them. However, you can also simply turn off suggestions in these situations, if they are not needed. To do so, turn off full_suggestions.

The suggestions presented to a user for a dimension using case will not be restricted when using full_suggestions. Any option that you include in a case parameter will be visible to all users.

Before

LookML

After

For more information, see this parameter’s reference page.

suggest_explore (Field) and suggest_dimension (Field)

Looker typically generates filter suggestions by executing a SELECT DISTINCT query on the field. For some large tables this query can be too slow or create too large of a database load. You can use suggest_explore and suggest_dimension to use an alternative dimension for filter suggestions.

Before

LookML

After

For more information, see the suggest_explore reference page and the suggest_dimension reference page.

suggestions (Field)

suggestions lets you hard-code a list of possible filter suggestion values. This can be useful if you do not want certain data values in a field to appear as suggestions, instead specifying a more limited list.

By using suggestions, you can greatly improve performance in some situations. Looker typically generates these suggestions by executing a SELECT DISTINCT query on the field. For some large tables this query can be too slow or create too large of a database load.

Before

LookML

After

For more information, see this parameter’s reference page.

Caching Filter Suggestions

This section describes the suggest_persist_for parameter, which lets you configure the length of time that filter suggestions are cached.

If your goal is reducing the load on your database and the number of data values for a dimension is very high, consider using a parameter to disable filter suggestions for your dimension. If you want filter suggestions to appear, consider using a parameter to limit the filter values that are queried or to hard-code the appropriate options.

suggest_persist_for (Field)

suggest_persist_for determines how long filter suggestions are cached.

When Looker determines the values that it will suggest to users when they filter on a dimension or filter field, it runs a query to find the unique values of that field. By default this list of suggestions is cached for 6 hours. However, you can change the amount of time that suggestions are cached using suggest_persist_for.

Before

LookML

After

For more information, see this parameter’s reference page.

Top