Do filter suggestions just query a view, or the whole explore?

When a user clicks a dashboard filter and Looker runs a quick query to return the distinct options that a user can select for that filter, does it just query the given view’s SQL table, or does it generate a query for the the whole explore?

For example, here’s an example explore:

explore: people {

join: countries {
type: inner
sql: ${countries.id} = ${people.country_id}
relationship: many_to_one
}
}

Let’s now say that on a dashboard, I set up a filter for the `people` explore and chose a dimension from the `countries` view called “Country Code”.

Is Looker determining a set of options by simply querying the countries table? Such as:

SELECT DISTINCT country_code
FROM bigquery_database.countries

Or is Looker setting up the entire explore? Such as:

SELECT DISTINCT countries.country_code
FROM bigquery_database.people AS people
INNER JOIN bigquery_database.countries AS countries ON countries.id = people.country_id
Solved Solved
0 5 542
1 ACCEPTED SOLUTION

You can catch this query in the admin-queries page (or the system activity history explore). 

View solution in original post

5 REPLIES 5
Top Labels in this Space