Dynamically add joins to "base" dataset based on filters #35620
greggailly
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Given a facts table with many dimensions related to it, imagine a dashboard allowing to filter on any of those dimensions.
Default approach would be to create a view inside the database with all possible joins in advance but that would be costly if only a few dimensions are used in the end.
How would it be possible to base the dashboard on the facts table but dynamically add joins to the dimensions tables based on the passed filters.
I've manage to extend the SqlaTable model to add a
joins
argument to theget_sqla_query
method and add them to the request but most of the subject needs to be explored (mapping filters to dimensions, prefix column names if multiple tables are part of the query...).Would it ever be considered as a possible feature and if so how do you think it should be implemented ?
Beta Was this translation helpful? Give feedback.
All reactions