Looker also supports extending LookML objects. Extending is useful when you want to create a new copy of an existing view or Explore so that you can add new objects to it. For example, you can create a base view that defines all your fields and then create multiple new views that extend the base view. These new views can then be modified to hide certain fields in the base view, or to change definitions or labels for the fields from the base view.
Refinements are useful when you want to modify an existing view or Explore with some tweaks or adjustments to certain objects, but you don’t want to create copies of the view or Explore. Refinements are ideal for situations where you cannot or do not want to modify the base view or Explore, and for situations where creating a new view or Explore would require extensive changes to other LookML references. See the Example section on this page for an example of this use case.
For most use cases, refinements are a simpler and cleaner alternative to extends
.
Advanced LookML developers may want to use the extends
parameter inside a LookML refinement. See the Refinements can contain extends section on this page for more information.
Read more in our original documentation.