Question

Joining multiple views(more than 50 ) to create a single explore

  • 11 May 2022
  • 1 reply
  • 21 views

Can we join more than 50 views to create a single explore?

If it is possible , then do we have to write multiple join statements (i.e more than 50 join statements )in the look ml ?

For instance , lets just say there are views like A,B,C , D….Z

To create one  common explore , do we have to write multiple join statements as shown below?

 explore: A {
   join: B {
    type: left_outer
    sql_on: ${A.id}=${B.id};;
    relationship:one_to_one
   }
  join: C {
    type: left_outer
    sql_on: ${A.id}=${C.id} ;;
    relationship: one_to_one
  }

  join: D {
    type: left_outer
    sql_on: ${A.id}=${D.id} ;;
    relationship: one_to_one
  }

and so on till Z
 }


1 reply

Userlevel 7
Badge +1

Yes you have to write multiple statements. We can’t use Liquid loops in a model file at that level, we can only use it in, for example sql_on parameter.

On the other hand, if you need to join 50 views in Looker, I would argue that perhaps it’s better to discover whether you can build at least part of this explore as a already made table in your data model (depending on the sizes of those source tables and columns of course)

Reply