Table
Metadata

Create an empty table

Create an empty table with the given name without touching storage. This is a metadata-only operation that records the table existence and sets up aspects like access control.

For DirectoryNamespace implementation, this creates a .lance-reserved file in the table directory to mark the table's existence without creating actual Lance data files.

post/v1/table/{id}/create-empty

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.

Request body

idstring[]
locationstring

Optional storage location for the table. If not provided, the namespace implementation should determine the table location.

{"stackTrail":"components:schemas:CreateEmptyTableRequest:properties:properties","oasType":"schema","type":"unknown"}

Example request

{
  "location": "location",
  "id": [
    "id",
    "id"
  ],
  "properties": {
    "key": "properties"
  }
}

Response

Table properties result when creating an empty table

transaction_idstring

Optional transaction identifier

locationstring
{"stackTrail":"components:schemas:CreateEmptyTableResponse:properties:properties","oasType":"schema","type":"unknown"}
{"stackTrail":"components:schemas:CreateEmptyTableResponse:properties:storage_options","oasType":"schema","type":"unknown","description":"Configuration options to be used to access storage. The available\noptions depend on the type of storage in use. These will be\npassed directly to Lance to initialize storage access.\n"}

Example response

{
  "transaction_id": "transaction_id",
  "location": "location",
  "properties": {
    "key": "properties"
  },
  "storage_options": {
    "key": "storage_options"
  }
}

Changes