We often want to use a saved look as a sort of template and then dynamically override specific filter values, such as when we embed Looker into another application.
This article shows you how to do this.
The following example shows a Look where the default value for
Orders Created At is saved as
on the day 2017-11-01.
We see this URL (replacing
<my_company.looker.com>with the URL to your company's instance):
In this case,
toggle=filappears in the URL, because we have expanded the filters box to show the value.
We can override the filter value by visiting a URL and changing it to this:
Looker automatically rewrites the URL into a unique query ID (
qid) parameter representing this ad hoc query, just like on an Explore page.
- This is the format of the query parameter:
Read more about filter expressions on the Looker Filter Expressions documentation page.
Other Query Parameters
You can also override other query parameters besides the filter values, such as
limit, or even the visualization options. To see the full list of parameters:
- Create a query in the Explore page.
Using the gear menu in the top right corner, select Share.
- Copy the URL in the Expanded URL field and paste it into a text editor to see the entire URL with all parameters.
This technique works with embedding, too:
/embed/in front as usual, and it will work as above.
- For SSO embed, make sure you add this to the
embed_pathcomponent prior to signing the iframe URL.