explore

LookML
Version

On this Page
Docs Menu

Go to Explore Parameter List

This page refers to the explore parameter that is part of a model

explore can also be used as part of a dashboard filter, described here

explore can also be used as part of a dashboard element, described here

Usage

Example

explore: explore_name {}

Hierarchy

explore

Default Value

None

Accepts

The name of an existing view, or a name for the explore when using from

Special Rules

Explore names must be unique within a given model

Definition

explore adds an existing view to the Explore menu of Looker as described on this page. As a best practice, an explore should be defined inside of a model file.

Explores are typically named after an existing view. However, if you want to have multiple explores based on the same view, you can add a from parameter to the explore. In that case, the explore can be given any valid name, which inclues only lowercase letters (a-z), digits (0-9), and underscores.

Explores play an important role in the SQL that Looker generates. Suppose a business user chooses customers from the Explore menu and runs a query. The customers explore is based on the view called customers, which is associated with a database table. That table is placed in the FROM clause of the user’s SQL query.

An explore can have many child parameters that affect the display, filter behavior, and specify adding joins for the explore. If an explore includes one or more joins, then those joins can have join parameters that specify the desired join behavior.

Examples

Add an option to the Explore menu based on the view called user:

- explore: user
explore: user { # additional explore parameters go here }

Add an option to the Explore menu called events based on the view called user_events:

- explore: events from: user_events
explore: events { from: user_events }

Common Challenges

explore Needs To Reference An Existing View Name

You cannot define the database table, dimensions, measures, and other fields that are part of a view via an explore parameter. Instead, you first need to define a view using the view parameter. Then you can reference the name of that view in explore.

explore Needs To Reference the View Name, Not Its File Name

Typically, the name of a view is the same as the view file where the view is defined. However, this is not required—the view and view file names can be different.

For example, suppose you had a scenario where a user view was defined inside of a file called company_users. Then the view file company_users looks like this:

- view: user …
view: user { … }

You would then add the user view to the Explore menu with:

- explore: user
explore: user { … }

Even though the user view is inside of a file called company_users, the name of the file does not matter. Only the name of the view in the view parameter matters.

Things to Know

explore Is Usually Used With Additional Parameters

It’s possible to use explore all by itself, without additional parameters. In practice, you typically will see explore used with additional options. For example, it’s very common to join additional views into an explore.

All of the additional parameters that are associated with explore are found here. The parameters that can be used for a join within an explore are found here.

Still have questions?
Go to Discourse - or - Email Support
Top