Skip to content
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

[IndexSheet] Some minor imperfections 4 #2603

Open
4 tasks
frosencrantz opened this issue Nov 11, 2024 · 4 comments
Open
4 tasks

[IndexSheet] Some minor imperfections 4 #2603

frosencrantz opened this issue Nov 11, 2024 · 4 comments
Labels

Comments

@frosencrantz
Copy link
Contributor

frosencrantz commented Nov 11, 2024

This is one of those multi-request feature requests related to IndexSheets:

  1. Add per join type commands, rather than have the user call the join command, and then select a join type. A workaround is possible to create macros or add these commands to an rc file. This should go under the "Data > Join" menu. The help text should match the help text for join-selected, but be specific to the join type of the command.
  2. SheetsSheet has 3 specific commands, why not make most of these generic to IndexSheet
    1. Columns-selected to see all the columns for the sheets in selected rows.
      SheetsSheet.addCommand('gC', 'columns-selected', 'vd.push(ColumnsSheet("all_columns", source=selectedRows))', 'open Columns Sheet with all visible columns from selected sheets')
    2. Describe-selected to get a describe sheet for all visible columns in selected sheets.
      SheetsSheet.addCommand('gI', 'describe-selected', 'vd.push(DescribeSheet("describe_all", source=selectedRows))', 'open Describe Sheet with all visible columns from selected sheets')
  3. Open-row / Enter: I think this is handled already.
@frosencrantz
Copy link
Contributor Author

This is useful for SQLite databases where all the tables are initially listed in an IndexSheet, but not in the SheetsSheet.

@midichef
Copy link
Contributor

I second the request for making commands for specific joins.

And also, building on that request more broadly, I feel visidata has a lot of untapped potential for letting users do joins easily. When navigating and choosing rows, keypresses like > and , and " are a big part of what makes visidata feel magic. Sometimes my tasks involve composing sets of results with multiple joins. If I could do a join with 1 keypress, that'd be even more magic.

I don't have a specific UI in mind though. There's a UI hurdle in choosing sheets to join. I feel that's the part that slows me down mentally. And part of that is because I lose track of my sheets on the SheetsSheet. One way around that would be a command that by default, targets the join from the current sheet to the most recently opened sheet with matching key columns. I'd love to hear any ideas relating to UI for joins. Perhaps the discussion belongs in its own thread?

@frosencrantz
Copy link
Contributor Author

One thing that might make is easier is the feature here: #1224.

If you end up working with SQLite sheets you need to visit the sheets until we can visit columns for multiple sheets from the IndexSheet.

The sqlite tables provide some details about primary keys, which could help with picking join columns easier.

Join picking is one of the areas where it would be nicer if it could be a little easier. Maybe if you could start with a column and value, and search for it in the other table columns to find likely candidate columns.

@frosencrantz
Copy link
Contributor Author

Maybe start a join on from the first sheet/column, and then go to a sheet listing columns in other sheets to pick the other join sheet.column(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants