[KongchangAI]
· 1 min read· 954 words

Datasette 1.0a46 Released: Import CSVs of Any Size Directly in the Browser

Datasette 1.0a46 Released: Import CSVs of Any Size Directly in the Browser

Datasette 1.0a46 adds browser-side streaming import of large CSVs and a column management UI, lowering the barrier to getting data in.

In an "Advent calendar" series introducing Datasette's new features from the past year, Simon Willison's first day focused on large CSV import just merged into 1.0a46. The new feature fills in the browser upload path: CSV/TSV files are parsed as a stream in the browser and submitted in batches to the insert API, so the whole file never needs to be loaded into memory and size is no longer a hard threshold. In the demo, 26,000 rows of iNaturalist observation data imported in seconds, followed by faceted analysis. The video also showed a table column selection and reordering UI that improves wide-table browsing. Willison acknowledged that features have outpaced public explanation, and this series is a way of catching up on product walkthroughs—reflecting the common open-source predicament of documentation and communication lagging behind.

Simon Willison, creator of the open-source data tool Datasette, kicked off an "Advent calendar"-style update series in December: a short video every day introducing features added to Datasette and its plugin ecosystem over the past year. Day one's topic was a feature he had just merged into Datasette 1.0a46—importing large CSV files.

Datasette large CSV import feature demo

Browser-side streaming parsing bypasses file size limits

Previously, importing data into Datasette usually meant relying on command-line tools or manipulating SQLite files directly, which was not friendly to users unfamiliar with the terminal. The new version fills in the browser upload path: users can select a CSV or TSV file directly on the web page, the file is parsed as a stream inside the browser, and then sent in batches to Datasette's insert API to be written into a table.

The clever part of this design is the word "streaming." The entire file is never read into memory at once; instead, it is parsed and submitted in batches as it goes, so file size is no longer a hard threshold. For users who frequently deal with exported logs, survey data, or public datasets, this greatly lowers the cost of getting data into Datasette.

Streaming parsing is a technique for reading and processing data as it arrives, as opposed to the traditional approach of "loading the entire file into memory before parsing." In a browser environment, this is typically implemented with the WHATWG Streams API and File.stream(): the file is split into chunks, decoded and parsed into records chunk by chunk, and released once processed, so memory usage depends only on chunk size and not on total file size. It is especially well suited to line-oriented text formats like CSV, because each line can be parsed independently without backtracking. The trade-off is that the parser must be stateful and able to handle line breaks spanning chunks, and error handling is more complex than whole-file parsing. Datasette uses this to downgrade "how big is the file" from a threshold problem to a timing problem of "how long will the upload take"—a common approach shared by recent browser-side data processing tools (such as DuckDB-WASM and Papaparse streaming mode).

Real-world test: importing over 20,000 rows in seconds

In the video, Willison gave a straightforward demo using iNaturalist observation records: a 26,000-row dataset finished importing in seconds. While this scale is not exactly massive, it covers a large number of everyday analysis scenarios and confirms the practicality of the batched-write approach.

The part after the import is also worth noting. He did not stop at "the data is in"; he went on to use faceting to slice and analyze the data, showing how handy Datasette is for data exploration. For many users, importing is only the starting point—being able to immediately filter and summarize data along multiple dimensions is where the value lies.

Faceting, which originates in library science and e-commerce filtering, means splitting a result set into mutually exclusive subsets based on the values of a field, while also providing a count for each value. Datasette makes faceting a core capability: with one click you can generate facets for any column (as well as keys inside JSON fields, date granularities, and so on), and clicking a value appends a filter condition on that dimension, with the URL changing accordingly—so every exploration state is shareable and bookmarkable. It is semantically similar to SQL's GROUP BY plus counting, but the interaction is progressive: users do not need to write queries in advance and instead converge on the subset they care about by clicking. This embodies Datasette's positioning of "turning data into explorable web pages" and makes post-import analysis virtually barrier-free.

Table column selection and reordering UI

The video also incidentally showed a new UI improvement: in table view, users can choose which columns to display and adjust their order. This feature may seem trivial, but it matters a lot for wide tables—when a table has dozens of fields, showing all columns by default drowns out what matters, and only on-demand trimming and ordering makes for a usable data-browsing experience.

An underappreciated open-source project catching up

Willison candidly admitted in the post that Datasette accumulated a large number of new features this year, but that he had not done enough to explain them to the outside world. Explaining one feature a day in "Advent calendar" form is, in a sense, giving the project a series of product walkthroughs.

This self-reflection also mirrors a common predicament for open-source tools: features iterate faster than documentation and communication, so users remain stuck with an outdated impression of the project. For a tool like Datasette, positioned as "turning data quickly into explorable web pages," lowering the import barrier and improving table-browsing experience are key moves to genuinely retain new users. The large-CSV import and the column management UI are pragmatic steps in that direction.

For developers already using Datasette, 1.0a46 is worth upgrading to soon; for those who have not tried it yet, dragging a CSV into the browser may now be the lowest-cost way to get started.

In Datasette 1.0a46, the "a" stands for alpha, meaning 1.0 is still in pre-release. Datasette has long iterated with 0.x version numbers, and 1.0 is seen as an important stability milestone involving the finalization of API shapes, plugin hooks, and the permissions model. Pre-release versions allow incompatible interfaces to continue changing before the final release, so they are suitable for users willing to follow new features and tolerate occasional breaking changes; production environments should pay attention to version pinning and upgrade notes. For plugin authors, the hook changes around 1.0 are especially worth watching, since the plugin ecosystem is the main source of Datasette's extensibility.

#Datasette#CSV import#streaming parsing#open-source data tools#faceting
Share:

Related articles