How to avoid/limit usage of dims and measures from two different views (unrelated structs) tied to common key in an explore?

I have a table with two unrelated repeated structures tied to common key and using this table to create an explore.

How am I building my explore:

  1. created three views files one each for structures and one for outer table
  2. In explore, joined the two structures to outer table by unnesting them.

With this I have an explore with two different sets of metrics and dims and few common dimensions coming from outer table.

Issue:

Often times, consumer mix the dims and measures of these two structs and complain that it is not working as expected when they were not supposed to use them together. I have the metrics and dims separated into two buckets using view_label but looks like that is not enough.

Is there anything we can do to limit users or put warning message when they mix dims and measure from different views?

Building a separate explore is not an option

0 1 97
1 REPLY 1

Very recently I had the same dilemma with just a bit different scenario. One table with common columns for both structures but sometimes columns for one of them. I separated the different ones into each view_label and only left the common ones with the same name as an explore. 

The thing is, there’s no way to force an error, a warning, or even some kind of a message in Looker.

You could try to break SQL using Liquid but can’t think of an easy way without having to include all fields in the Liquid statement. Not to mention it would just bring more pain of answering questions of frustrated peers why things aren’t working, it wouldn’t necessarily teach them to stop doing the wrong thing.

Top Labels in this Space
Top Solution Authors