Possible to hide joins?

lookml
low_priority
done
reply
(Dimitri Masin) #1

We would like to restructure/clean-up existing explores to make our models more intuitive. However I would like to avoid breaking too many things. Similar to explores and fields, is it possible to hide joins? So that users can’t pick from those any more but existing Looks don’t break.

Thanks in advance,
Dimitri

1 Like

(jeremy.eckman) #2

Hey @Dimitri_Masin,

There isn’t a ‘hidden’ parameter that can be applied to joins. I am trying to see if there is a workaround, but the most straightforward way of addressing this might be to either create an new explore that doesn’t have these joins. Ideally, you could have a base explore with only the necessary joins and extend that (doc here) to have the joins needed for the existing views. This would be a bit trickier since you would be changing it over to a base explore, then extending that for the looks (which would then be the extended explore) and then hiding that explore (discourse explanation here). The content validator (doc here) would be really helpful here in making sure none of the Looks that are using the explore got broken in either the process of extending or in just creating a separate explore for them, or using it to change the reference of those looks to a new explore.

If you have additional questions, feel free to reach out to us here at support@looker.com

Best,
Jeremy

0 Likes

(lloyd tabb) #3

Unfortunately, there is no way to do this ‘en mass’. The simplest way I can think to do this would be to use extends. Create an extended version of the view that hides all the fields and join it in instead.

Suppose you have:

explore: some_explore {
  joins: some_view {
    ...
  }
}

view: some_view {
   dimension: d1 {...}
   dimension: d2 {...)
}

To hide all the fields in some_view

explore: some_explore {
  join: some_view {
    from: some_view_hidden
    ...
  }
}

view: some_view_hidden {
  extends: [some_view]
  dimension: d1 {hidden: yes}
  dimesnion: d2 {hidden: yes}
}

0 Likes

(Dimitri Masin) #4

thanks @jeremy.eckman and @lloydtabb.
I ended up changing the view_label of those joins to “xxx TO BE REMOVED” which collapses the three unnecessary joins to one label and puts it to the end of the list. My hope is that people will not use it and I can remove them in 6 months time. Not very clean, but in terms of effort/value tradeoff seemed like an acceptable solution to me. Hidding the joins would have been a lot slicker :slight_smile:

1 Like

(jeremy.eckman) #5

Thanks for sharing your solution @Dimitri_Masin - I’m glad you were able to find a solution that fits your needs- this should help ease the transition to removing those joins without putting too much time into trying to hide those joins. :smiley:

0 Likes

(Bastian) #6

You can try to use an empty fields tag in the join-block of your explore. Since you don’t include any fields from the join, all dimensions and measures from the join are not included in the field-picker.

4 Likes

(Ben Cipollini) #7

Awesome, just tried this and it worked like a champ!

0 Likes

(jd) #8

Being able to hide fields from explore en masse like this would be immensely useful

1 Like

(Talal) #9

Thanks for the feedback! I’ve relayed it to the product team.

Cheers,
Talal

0 Likes

(Ravi Shelly) #10

Using fields restrict the information being picked up. Suppose we just need to hide the information in the explore. But needs to see the dimensions in some other explore. So we need an option to hide the dimension from the explore as well

0 Likes

(Aleksandrs Vedernikovs) #11

Hey @rshelly,

Why not use hidden: parameter in the case if you want to hide certain dimensions/explores.
If you want to selectively hide fields in field picker that is currently not possible. If a field is excluded from a join, it’s not reference-able, correct. It’d be possible to create a filtered measure based on the field, but it would be hidden from the field picker for certain, declared explores. I am happy to pass along your use case to our Product team.

Best,

Sasha

0 Likes

(Ravi Shelly) #12

Hi @Aleksandrs_Vederniko,
I am not trying to hide the explore. I want to selectively hide dimensions from various different explore.
And I want to just hide them, not remove access.

0 Likes

(Aleksandrs Vedernikovs) #13

Hi @rshelly,

Ok, I got you. So this is not currently possible as I mentioned above. However I am happy to pass this along to our Product Team.

Best,

Sasha

0 Likes

(Kevin Loh) #14

Is there an update to this? I’d like to selectively hide fields from certain explores while keeping these fields available for other explores.

0 Likes

(Nicholas Wong) #15

I don’t think Looker have any updates for this at the moment.

I guess this highlights the important of management of information system to Looker developers. One brilliant tool I came across is Henry - a bot that helps identify codes which can be deleted. You can read more about it at Henry - A Command Line Tool for Looker Instance Cleanup.

However if you’re trying to just HIDE it from certain views, I guess grouping them in a folder and labelling it that says its removed is the only way to go. Personally, I faced the same problem… Hence, we added the word “deleted”. But it will be a great feature for Looker product team to add! :smiley:

Anyways you can vote for features here, https://discourse.looker.com/c/feature-requests

0 Likes

(Izzy) #16

Kevin, It sounds like your use case actually would match the use of the fields parameter! It lets you explicitly hide fields from certain explores. Check it out:

1 Like