Using
Creates a relational table from an uploaded CSV/TSV file: infers one LuraDB type per column, then imports every row through the existing DML write path -- a row that fails is logged, the import continues. Requires DDL access, enforced the same way the `/sql` handler enforces a DDL statement.
applies to v0.5.1const url = 'https://example.com/store-api/rel/example/tables/from-file?name=example&format=example';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'text/plain'}, body: 'example'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://example.com/store-api/rel/example/tables/from-file?name=example&format=example' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: text/plain' \ --data exampleAuthorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Relational domain
Query Parameters
Section titled “Query Parameters”Name of the table to create
“csv” or “tsv” – no format sniffing
Whether the first line is a header row (default true)
Existing (normalized) column to use as primary key; omitted -> synthetic _row column
Request Bodyrequired
Section titled “Request Bodyrequired”Raw CSV/TSV file bytes – Content-Type is not enforced, format decides
Responses
Section titled “Responses”Table created and its rows imported (imported/failed counts, per-row error log)
object
object
object
Example generated
{ "columns": [ { "name": "example", "primary_key": true, "source_header": "example", "type": "example" } ], "errors": [ { "error": "example", "row": 1 } ], "failed": 1, "imported": 1, "table": "example"}Missing/invalid name or format, empty file, too many columns, invalid header UTF-8, or an unknown pk column
Missing DDL access on the domain
Domain not found
A table or view with that name already exists
Domain is being deleted
Body exceeds rel.import_body_limit_bytes
Per-domain request budget exceeded
Relational engine disabled
Insufficient Storage — disk space or memory runs short; the write was not applied. Reads go on; retry after the seconds in Retry-After.