-
Notifications
You must be signed in to change notification settings - Fork 60
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. |
There are usecases for customization about how selections are resolved within single tables too. e.g. I have different versions of numbers in a single table ( So I want my Currently I implement this using an interval interactor with An alternative for me might have been to transform my data to |
Hi @declann, I'm preparing a PR that includes a new "region" interactor that allows you to make 2D selections that map to individual fields of selected elements (like ids) rather than intervals. This might fit your use case. If so, look for that soon! |
That's exactly what I want! 😃 Just to add then, already I use multiple tables fine in Mosaic: a summary and a detail table. As long as the selections as I apply them to tables can find corresponding fields, everything works (selections are table-agnostic and this is good here). Selection resolution is the more helpless bit atm (without workaround/"region" interactor), but I might be missing something. Looking forward to trying that interactor whenever it's available to test! |
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: