Edit like a Spreadsheet V1

FEATURE RELEASEWEB
3 min read

DoltHub is a place on the internet to share, discover, and collaborate on Dolt databases. For about a year we've been working on adding more ways to edit data on DoltHub. Edit like a spreadsheet has been one of the most asked about features on our roadmap, and we're excited to start to bringing it to life.

Our current edit on the web features include file upload, editing data using SQL, and edit cell/row buttons. Our end goal for edit like a spreadsheet 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. For version one, we utilized our file upload feature to create files and edit existing tables in a spreadsheet editor within DoltHub.

How it works

For those who haven't tried it, you can create new tables and update existing tables by uploading a file to DoltHub. This is handy for those who already have CSVs lying around, but sometimes it's more convenient to make changes to tables without leaving DoltHub at all.

Creating a new table

The DoltHub team keeps a blogging schedule so that we always have new blogs every Monday, Wednesday, and Friday. Right now we keep this information in a Google Sheet, but with our new spreadsheet editor it's easy to use DoltHub instead. First, I create a new database and select "Create new table" from the dropdown on the top right.

Create new table dropdown

This will take you through the beginning of the file upload process. I choose a table name (blogs), and then instead of uploading a file from my computer, I click "Open spreadsheet editor". An empty spreadsheet will pop up that looks like this:

Empty spreadsheet editor

The first row of the spreadsheet is reserved for column names. I added a few columns and rows with our blogs for early October. Some people are still choosing their topics, but these values can easily be changed later. When I'm done, I click "Upload table".

Add spreadsheet values

I am given the option to create a keyless table or choose a primary key, or a unique identifier for a row. Because primary keys allow for cellwise diffs and other optimizations, I'm using date as our primary key (we never have more than one blog per day). I could always add primary keys later if I wasn't sure.

Choose primary key

We infer a schema for you based on the column values, which you can edit if you need to using the "Edit schema" button. This schema looks good to be, so I stick with it.

Schema diff

Once everything looks good, I can commit directly to the main branch and see my new table.

Updating an existing table

Now that I have a blogs table and this blog is live, I can go back and update the status of this blog and add a few more blog dates for October. I click on the pencil next to blogs in the left table list, which will show me some different ways I can edit my table.

Edit table page

Clicking on "Edit in spreadsheet editor" will open my existing blogs table in the spreadsheet editor.

Existing table

I update my blog row's status and url, and add more blog dates for other members of the team.

Edit existing table

Once I upload the table with my changes, I can review the diff of exactly what was changed.

Update diff

Since our database isn't empty anymore, when I create a commit a pull request is opened against the main branch. If I wanted to I could ask member of the team to review my changes to the blog schedule before I merge.

Conclusion

This is another step to making editing data on DoltHub easier, especially for those less familiar with SQL and Git. This is just the start of edit like a spreadsheet, and we're looking forward to continue improving and adding to this feature.

If you're pumped about edit like a spreadsheet or have any feedback or feature ideas, come talk to me in our Discord. If you're interested in working on projects like this at DoltHub, we're currently looking for full stack software engineers. Check out the job posting here.

SHARE

JOIN THE DATA EVOLUTION

Get started with Dolt

Or join our mailing list to get product updates.