REST Implementation Non-Standard Operation - CreateTable
REST Route Definition
/v1/table/{id}/create:
parameters:
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/delimiter'
- name: "x-lance-table-location"
in: header
required: false
schema:
type: string
description: URI pointing to root location to create the table at
- name: "x-lance-table-properties"
in: header
required: false
schema:
type: string
description: |
JSON-encoded string map (e.g. { "owner": "jack" })
post:
tags:
- Table
- Data
summary: Create a table with the given name
operationId: CreateTable
description: |
Create table `id` in the namespace with the given data in Arrow IPC stream.
The schema of the Arrow IPC stream is used as the table schema.
If the stream is empty, the API creates a new empty table.
REST NAMESPACE ONLY
REST namespace uses Arrow IPC stream as the request body.
It passes in the `CreateTableRequest` information in the following way:
- `id`: pass through path parameter of the same name
- `location`: pass through header `x-lance-table-location`
- `properties`: pass through header `x-lance-table-properties`
requestBody:
description: Arrow IPC data
content:
application/vnd.apache.arrow.stream:
schema:
type: string
format: binary
required: true
responses:
200:
$ref: '#/components/responses/CreateTableResponse'
400:
$ref: '#/components/responses/BadRequestErrorResponse'
401:
$ref: '#/components/responses/UnauthorizedErrorResponse'
403:
$ref: '#/components/responses/ForbiddenErrorResponse'
404:
$ref: '#/components/responses/NotFoundErrorResponse'
503:
$ref: '#/components/responses/ServiceUnavailableErrorResponse'
5XX:
$ref: '#/components/responses/ServerErrorResponse'