Can I use `hidden` on a join?

Knowledge Drop

Last Tested: Mar 5, 2021

No, you can use hidden only at the explore and field level (documentation).

BUT, there are workarounds.
 

Method 1: use fields: [] instead on the join (documentation). This will effectively do the same thing as hidden would because it tells Looker to not bring any fields into the explore. Caveat: If any current content uses fields from this join, the content will break because the fields are no longer in the explore.

For example:

join: foo {fields: []}

Method 2 (better way): use an empty view_label parameter in the join (documentation).

For example:

explore: orders {

join: users {

type: left_outer

sql_on: ${orders.user_id} = ${users.id} ;;

relationship: many_to_one

view_label: ""

}

}

Will show up as this in the explore:

image.png

This content is subject to limited support.                

Comments
delphine_pessoa
New Member

Brilliant! 

I needed just this (second option) to enable drill-downs from a higher level view to a smaller level view but prevent users from inadvertently multiplying rows by adding fields from the smaller view level (which has another explore specifically for it).

Version history
Last update:
‎04-05-2021 03:32 PM
Updated by: