Edit on the Web Redux
DoltHub is a place on the internet to share, discover, and collaborate on Dolt databases. About a year ago we set off on a journey to make adding and editing data on DoltHub possible. Our goal was to ease collaboration on data using Dolt and DoltHub, especially for users less familiar with Git and SQL. Our roadmap included file upload, using SQL to edit data, and editing tables like a spreadsheet. We took a break recently to improve diffs and our internal bounty tools, but we're back on the edit on the web roadmap, so here's an update with our current progress and future vision.
Current edit on the web features
Have a CSV with some sick data you want to upload? Know SQL and want to make a few quick updates to a table? If you didn't know already, this is currently possible on DoltHub! Because we're all about version control here, any change you make to your data on DoltHub goes through the pull request workflow. This makes it (almost) impossible to mess up and is a great way to review your data before merging it into your main branch.
We launched file upload in November. You can get to it
+ dropdown on the top right of the database page.
You can choose to either create a new table or update (updates existing content with new content) or replace (removes existing content and replaces with new content with existing schema) an existing one.
If you're creating a new table, we'll infer a schema for you based on the data, but you can easily update column types using our "edit schema" form.
If your changes look reasonable, you can open a pull request, which can be reviewed by you or other members of your team (similar to GitHub).
We support multiple file types (csv, psv, xlsx, json) for files up to ~128MB (for comparison Google Sheets has a limit of 100MB for upload and convert), which we plan on increasing over time.
Edit using the SQL Console
When we released editing data using SQL on the web in March, we needed to come up with a way to "stage" temporary changes, similar to staged changes in Git and Dolt's CLI. We came up with "workspaces" to simulate this concept. This was an exciting feature because it opened up a lot of possibilities for other ways we can edit data on DoltHub.
For example, I could use the SQL Console to run an
INSERT query, which will add a row to
This takes me to a new workspace, where I can view the resulting changes of my query.
If I wanted to insert another row, I could do so from the SQL Console within the workspace. This lets me view both the current diff of the most recent query, as well as the cumulative diff of both queries.
Workspaces allow users to play with data with zero consequences. If you decide your changes suck, you can easily delete the workspace, and no one will ever know what you did.
If you decide your changes are awesome (more likely), you can create a pull request from the workspace and send it off for review.
Edit like a spreadsheet
Editing a Dolt table like a spreadsheet on DoltHub has been at the top of our "this would be super cool" list for a long time. And we're now taking the time to make it happen.
Our goal is to make editing a table on DoltHub as functional as TablePlus or DBeaver, with the added sugar of Git-like features like diffs, pull requests, etc. We're also planning on exposing the SQL diff as you make changes, so that you do not need to know SQL to edit a table, but you can learn SQL by editing a table.
We've added some small features to start with, like updating a single cell and removing rows and columns. For example, if I wanted to edit a cell, I could click the "Edit Cell Value" button in the cell dropdown.
The cell will change to a text input, where I can change the cell value.
This will create a new workspace, similar to using the SQL Console above.
As you can see, a SQL
UPDATE query was generated from my cell change. Did I need to know
SQL to change this cell? Nope. Did I just learn how to update a cell using SQL? You bet!
This is currently a work in progress. Obviously editing one cell at a time is not that helpful if you want to change a whole row or table. But stay tuned, because that's on its way.
Some spreadsheet features we have in the pipeline:
- Add a new table using a CSV editor on DoltHub
- Add a new column or row
- Apply a formula to a column
We want to make DoltHub a welcoming place for everyone to share data, whether or not you know SQL. If you're pumped about edit like a spreadsheet or have any feedback or feature ideas, come talk to me in our Discord. I'll also be giving updates there and in future blogs.