Can i join two explore together?

I wanted to union two explore in one big explore, is it possible to join both explore or what should i do in that case ??
Also the problem is the join relationship would be many to many i guess

0 5 9,543
5 REPLIES 5

Hi Khaled,

Looker support here. Thanks for reaching out! There are a few ways we might be able to do this. If you have Looker development access, we may be able to use the “join” LookML parameter to join the two views together: https://docs.looker.com/reference/join-reference

If you do not have LookML access, or do not want to create a new Explore in your model, we may also be able to use merged results: https://docs.looker.com/exploring-data/exploring-data/merged-results. To do this, we would select the fields for the first explore and run it, click the gear icon next to the “Run” button, and click “Merge Results”. Then, we can choose an Explore and the fields to join into the first result.

If you have additional questions on how to use either of these solutions with your data, also feel free to visit us at help.looker.com!

Best,
Andrew

Hey Khaled,

Just following up with some additional information regarding joining in LookML. You mentioned that the join relationship would be many-to-many; Looker supports many-to-many joins by specifying the “relationship” LookML parameter: https://docs.looker.com/reference/explore-params/relationship

Also, to clarify, to go the route of joining your data in LookML, we would take the first explore and join each view included in the second explore into this first explore by specifying a “join:” parameter for each view.

Again, feel free to let us know if you have any additional questions!

Best,
Andrew

GenDemo
Participant V

this is not a union though…

That’s true— In order to actually union two explores together, you’d need to use a SQL derived table. It’d be kinda messy but you could open explore #1, select every field, copy/paste the SQL generated by that into the derived table’s SQL, and then do the same to explore #2, separating them with a UNION or UNION ALL. There’d probably be a little bit of optimizing to do (limits, group bys, changing field names if needed)

Top Labels in this Space
Top Solution Authors