Reusing the LookML code
There are multiple ways to reuse the elements in LookML, such as the following:
include
extends
${}
- Refinements
- Looker Blocks
We’ve already used $
quite a lot to reference the existing dimensions and measures.
We have also used the include
parameter, which specifies the LookML files that will be available to a model, a view, and an Explore. If you want to use or reference a LookML file within another file, you must add it with the include
parameter.
Let’s review some other techniques you can use to reuse elements in Looker.
Getting ready
Make sure you are in your LookML environment, and Development Mode is activated.
How to do it...
The extends
parameters can be used both for views and Explores. For example, you can use the extends
parameter in views to reuse the content and settings of another view, with the ability to override any settings that you want.
We can learn how to do that by following...