Skip to content

How to merge result sets between two independent sources #640

Answered by lloydtabb
djouallah asked this question in Q&A
Discussion options

You must be logged in to vote

Queries can be joined and used in lots of ways in Malloy including join two or more query results together.

Any query can be used as a source. For example:

https://github.com/looker-open-source/malloy/blob/main/samples/names/names.malloy

Any query can be dynamically joined into a source in a single query for example..

https://github.com/lloydtabb/malloy_examples/blob/main/imdb/movie_complex.malloy#L11

Two query or more queries can be joined to gether in

query: merged is from(->query1) {
   join_one: q2 is from(->query2) on ...
   join_one: q3 is from(->query3) on ...
   project: *, q2.*, q3.*
}

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@lloydtabb
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by djouallah
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants