mirror of
https://github.com/simonw/datasette.git
synced 2025-12-10 16:51:24 +01:00
Streaming mode for downloading all rows as a CSV (#315)
* table.csv?_stream=1 to download all rows - refs #266 This option causes Datasette to serve ALL rows in the table, by internally following the _next= pagination links and serving everything out as a stream. Also added new config option, allow_csv_stream, which can be used to disable this feature. * New config option max_csv_mb limiting size of CSV export
This commit is contained in:
parent
0d7ba1ba67
commit
fc3660cfad
11 changed files with 142 additions and 24 deletions
|
|
@ -125,3 +125,24 @@ Sets the amount of memory SQLite uses for its `per-connection cache <https://www
|
|||
::
|
||||
|
||||
datasette mydatabase.db --config cache_size_kb:5000
|
||||
|
||||
|
||||
allow_csv_stream
|
||||
----------------
|
||||
|
||||
Enables the feature where an entire table (potentially hundreds of thousands of
|
||||
rows) can be exported as a single CSV file. This is turned on by default - you
|
||||
can turn it off like this::
|
||||
|
||||
::
|
||||
|
||||
datasette mydatabase.db --config allow_csv_stream:off
|
||||
|
||||
|
||||
max_csv_mb
|
||||
----------
|
||||
|
||||
The maximum size of CSV that can be exported, in megabytes. Defaults to 100MB.
|
||||
You can disable the limit entirely by settings this to 0::
|
||||
|
||||
datasette mydatabase.db --config max_csv_mb:0
|
||||
|
|
|
|||
|
|
@ -122,6 +122,7 @@ This will restrict sorting of ``example_table`` to just the ``height`` and
|
|||
You can also disable sorting entirely by setting ``"sortable_columns": []``
|
||||
|
||||
.. _label_columns:
|
||||
|
||||
Specifying the label column for a table
|
||||
---------------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue