Question

Cannot add the set I created in my view in the Explore

  • 6 August 2021
  • 2 replies
  • 22 views

Hi there,

I have encountered an issue on something that seems very basic (and probably is). I’ve never had this problem before.

So, I created a new view (let’s call it “support_platform”), in which I defined a set of fields (“analysis_fields”), so I can have only the relevant fields in my explore later.

Then, I created the explore based on this view, but when I want to tell Looker to take “fields: [support_platform.analysis_fields]” to only display the set of fields I created, I cannot make it work. I can either have all the fields of  support_platform* or it selects analysis_fields* alone but then in the explore nothing shows. I usually never encounter issues to specify sets but I also never created a view form scratch before so I’m probably missing something. Any idea?

Thanks a lot!


2 replies

Hi! I had a similar issue when joining multiple views in the Explore. I ended up finding a few things that were causing the issue.

First, when making the set for the fields to use, make sure that you have prefaced the fields with the view name (ie. my_data.column_1). I found LookML won’t show an error in the code, but that you won’t get the results you expect without it.

Secondly, it might be a misunderstanding on my part in your explanation, but you need the * to identify it as a set (ie. fields: [my_data.column_basics*] )

Finally, if you are making a join with multiple views, I found that I would get mixed results trying to specify the sets on each join. I had better luck grouping them all together before the final closing curly bracket ie:

 

explore: mydata {

  join: my_other_data {  … }

  join: other_other_data {  … }

  fields: [
     my_data.column_basics*,
     my_other_data.more_basics*,
     other_other_data.more_basics*]

}
 

I hope this helps you out!

Thanks a lot rking-1628023631 for this very detailed response! Indeed, I forgot the *, which solved the issue for 2 of the sets I wanted, but I still have 2 that I don’t manage to add so your answer will sure help! I’m going to check and try adding them at the end.

Thanks again!!

Reply