Table
Data

Create a table with the given name

Changed on

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
  • mode: pass through query parameter of the same name
  • properties: serialize as a single JSON-encoded query parameter such as properties={"user":"alice","team":"eng"}; these are business logic properties managed by the namespace implementation outside Lance context
  • storage_options: serialize as a single JSON-encoded query parameter such as storage_options={"aws_region":"us-east-1","timeout":"30s"}; these configure write-time overrides for data and metadata written during table creation
post/v1/table/{id}/create

Request

  • Base URL
    http://localhost:2333
  • Auth
    • OAuth 2
      Client credentials
      Token URL: /oauth/token
    • or HTTP bearer
    • or API key in header x-api-key

Path parameters

idstring required

string identifier of an object in a namespace, following the Lance Namespace spec. When the value is equal to the delimiter, it represents the root namespace. For example, v1/namespace/$/list performs a ListNamespace on the root namespace.

Query parameters

delimiterstring

An optional delimiter of the string identifier, following the Lance Namespace spec. When not specified, the $ delimiter must be used.

modestring
propertiesstring

Business logic properties managed by the namespace implementation outside Lance context. The map is translated to a single JSON-encoded query parameter such as properties={"user":"alice","team":"eng"}.

storage_optionsstring

Storage options that configure overrides for writing table data and metadata during table creation. These are passed to Lance for the write path. The map is translated to a single JSON-encoded query parameter such as storage_options={"aws_region":"us-east-1","timeout":"30s"}.

Request body application/vnd.apache.arrow.stream

string binary required

Response

Table properties result when creating a table

contextunknown
transaction_idstring

Optional transaction identifier

locationstring
versioninteger
storage_optionsunknown
propertiesunknown

Example response

{
  "transaction_id": "transaction_id",
  "context": {
    "key": "context"
  },
  "location": "location",
  "version": 0,
  "properties": {
    "owner": "Ralph",
    "created_at": "1452120468"
  },
  "storage_options": {
    "key": "storage_options"
  }
}

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the new optional query request parameter properties to all path's operations

    • info

      added the new optional query request parameter storage_options to all path's operations

    • info

      added the new optional query request parameter properties

    • info

      added the new optional query request parameter storage_options

    • info

      added the non-success response with the status