Looker will not be updating this content, nor guarantees that everything is up-to-date.
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 post 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 <instance_name.looker.com>
with the URL to your company's instance):https://<instance_name.looker.com>/looks/:id:
In this case, toggle=fil
appears 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:https://<instance_name.looker.com>/looks/:id?f[orders.created_date]=7+days
Looker automatically rewrites the URL into a unique query ID (qid
) parameter representing this ad hoc query, just like on an Explore page.
f[view.field_name]=filter_expression&f[view.other_field]=filter_expression&etc
Read more about filter expressions on the Looker Filter Expressions documentation page.
You can also override other query parameters besides the filter values, such as sort
or limit
, or even the visualization options. To see the full list of parameters:
Using the gear menu in the top right corner, select Share.
This technique works with embedding, too:
/embed/
in front as usual, and it will work as above.embed_path
component prior to signing the iframe URL.