-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-Table Support #398
Comments
In https://github.com/cmudig/Texture @willeppy has shown the value of being able to do queries over joined tables. |
More info about how I did it for that project... I extended the selection in mosaic to track the table names for the table the selection comes from and is applied to (PR: willeppy#5)
As an example:
SELECT
*
FROM
"main_table_reviews"
WHERE
EXISTS (
SELECT
1
FROM
"word_table"
WHERE
"main_table_reviews"."id" = "word_table"."id"
AND "word" = 'hello'
)
AND "sentiment" = 'negative'; So I think it would be possible to extend this to a more generic implementation potentially where you specify how to join charts and what key to use for joins One note: anecdotally this makes the client interactions slower right now because I think it messes up the indexing used by mosaic, I haven't looked into this very deeply yet though |
This would save a lot of data transfer for us using a standard star schema design where we currently have to pre-join the data. |
Mosaic assumes a single table right now but often data is spread across tables. Take for example a dataset with movies and actors. The tables could be joined but then the counts for histograms over movies or actors would become confusing. This project adds support for multiple tables by defining what table a selection is over and resolving the selection to the correct joins over other tables.
The text was updated successfully, but these errors were encountered: