glue
glue copied to clipboard
Expose join_on_key in the UI
Is your feature request related to a problem? Please describe it:
The very useful join_on_key
functionality is currently only available through the terminal or scripting. Several past responses (#2050 #1917) suggest that there are plans to expose it through the UI, but I'm opening this as a specific issue for this feature.
Describe the solution you'd like:
join_on_key
should be available through the UI to allow linking different datasets by a common key/ID. I propose that this should be as part of the existing linking UI and that join_on_key links should be visualized with a different connection type (dashed line rather than solid?).
Describe alternatives you've considered:
Alternatively, a separate window could enable the join_on_key
functionality, since this is fundamentally a very different kind of linking operation.
Short-term, the easiest is probably to list it as another link type in the existing list, so maybe e.g. 'join' or something similar instead of 'identity', as it is similar to a database join. I do wonder if we couldn't generalize the linking class hierarchy to include these kinds of linking and avoid having to have a lot of hard-coding for join_on_key as is the case right now.
In the long term I think we want to re-think a bit the UI, and have yet more kinds of linking such as nearest-neighbour linking and so on. I think that we probably want a single visualization for all links with different line types for different conceptual kinds of linking. See also https://github.com/glue-viz/glue/issues/798 which was to keep track of the more general refactor.
Ok -- I'm working on a PR doing the short-term/easy thing of just adding another link type == "join" in the current UI with a different line type. The basic idea was to use a special dummy superclass of ComponentLink (called KeyLink) to represent the join_on_key links in the UI and enable deleting them.
I agree that generalizing the linking class hierarchy makes sense if we end up adding more linking types ala nearest-neighbor -- but generalizing for n=2 does not seem worthwhile right now.