GRIDDED AF
OVERVIEW & RATIONALE
sql and csv files can be the lifeblood of data projects. They are easily portable, and a variety of technical and non-technical users understand how to use them. But as they increase their number of rows and/or columns, they become remarkably difficult to understand within a text editor.
I work on a project that is configured with dozens of sql files with the format INSERT INTO my_table(HEADER1, HEADER2, HEADER3) VALUES (1, 2, 3) . Of course, they have tens of columns and hundreds of rows. I developed this initially as a tool simply to be able to visualize the data contained in these tables. But as I built it, it became too tempting to be able to edit these files as well.
I am hopeful that many more useful features will come.
To use, simply install the extension. Then, with a csv or sql file, hit CMD-SHIFT-P and type gridded af to open the GUI editor.
MAIN FEATURES
- open your
sql and csv files so that you can view the data an easy-to-read grid of rows and columns
- make changes to existing data within a GUI and save the changes to your file
- insert rows and columns easily
- delete rows
CAVEATS
- Currently, GRIDDED_AF can read sql files with a variety of text formats. The same INSERT VALUES statement can be a single line or spread across many rows. There may be tabs or leading spaces, or there may be none at all. Regardless of how the file is formatted initially, GRIDDED_AF will save the file in a singular, opinionated format--multiple lines, no tabs. This may not be ideal, particularly for those with different formats who also have version control. (Maybe the best way to handle this would be to open your file in GRIDDED_AF, immediately save the changes, commit those as formatting changes, and then proceed to make any actual changes.)
- A word on volume. The whole point of this extension is to easily view and edit files with dozens of rows and columns. It has worked well for me many of my configuration files. But keep in mind that the entire file is rendered in the grid. It is a react app, and so it is rerendered everytime a simple change is made. Users may notice slowness if there are more than, say, 1000 rows or 100 columns. This may not be the right tool for larger files like that.
- Beware, you users who do not have autosave enabled. When you click "Save" from within GRIDDED_AF, the changes will save directly to disk. I don't expect this to be a problem for users with version control. Also, within the newly-saved file, you can still
undo the changes saved to disk in a single command.
- Saving to files that had comments is problematic. GRIDDED_AF can read files with comments, and it can edit them, and it can save those files. But upon saving, those comments will be gone. Surprise! My best advice here is to use version control to work around this limitation. I'm not currently able to imagine a way to solution around that. (Maybe I could assume that comments relate to the row they precede? Not sure... and I'm not actively working on that one.)\
- I work in dark mode, so this looks good in dark mode. Well maybe not good, but at least how I intended it. I suspect it looks terrible not in dark mode. That's on a list of things to add.
FEATURES I AM CONTEMPLATING
- being able to duplicate data when inserting a row
- using arrow keys to move around the grid
- filtering rows so you can see distant rows with commonalities at once
| |