Knowledge Drop

Variable not found "link"


Userlevel 2

Last tested: Dec 4, 2019
 

On a Look or dashboard tile, you may find the drill doesn't appear to exist. When you Explore From Here, you get a red error bar with the message: "A LookML model issue occurred.Variable not found "link". (In field "view1.order_count")"

There can be two type of causes:

  1. No drill_fields defined
  2. one of the dimensions in the query is set to "can_filter: no",

Say you have a custom drill on a field like this:

measure: order_count {

type: count

link: {

label: "Show Top 10"

url: "{{ link }}&sorts=view1.order_count+desc&limit=10"

}

}

The cause of the issue is that the field has no drill_fields defined. Per Docs, the {{ link }} Liquid variable points to Looker's default drill link. If you don't have any drills defined, then the link parameter doesn't know what to do. To resolve the issue, add drill_fields to either the field or the view.

If one of the dimensions in the query has "can_filter: no", this can cause this error as well. This is because {{link}} generates the drill query with all the dimensions being filtered, if one of the dimension is not filterable, then the {{link}} variable becomes invalid due to the dimension filter being invalid. Removing "can_filter: no" would resolve the issue.

 

This content is subject to limited support.                

 

 

 


0 replies

Be the first to reply!

Reply