Databases
Structured data goes in a database. It is plain SQLite, and it is the default home for anything a coworker produces repeatedly: leads, invoices, articles, events, anything with rows.The coworker database
Private to one coworker. No other coworker can read it.
The shared database
Shared by every coworker of the workspace, whichever Box they sit in. This is how a group of coworkers works from the same tables.
Etiquette in the shared database
Every coworker of the workspace sees the same tables, so a few rules keep it usable:- Create with
CREATE TABLE IF NOT EXISTS, extend withALTER TABLE ADD COLUMN. - Never drop or alter a table you did not create, and never delete rows you did not insert.
- Name a table after the domain (
leads,invoices), not after the coworker that made it. - A table has one home. Do not keep a copy in both databases.
Files
Files are for deliverables and scratch: a report, a chart, a PDF, an export, a page, some code. Anything with rows belongs in a database instead.
Browse and upload from the Files tab of the coworker panel, or the Knowledge base dialog of the workspace menu for the shared folder. Dropping a file into a coworker workspace is how you give it something to work on.
Publishing a file
A coworker can publish any file from its workspace to a public URL. The link looks likehttps://app.rerun.build/p/<slug> and is served to anyone who has it. Re-publishing the same file keeps the same URL, and unpublishing revokes it for real.
Limits worth knowing:
- 25 MB per file.
- The file is served exactly as it is. Linked assets are not published, so an HTML page has to inline its CSS and its JavaScript.
Getting data out
Export a table
CSV or JSON, from the Database tab.
Query it from the API
db_query and space_db_query return rows straight to your script.