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.

Deprecated: Use DeclareTable instead.

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

{"stackTrail":"components:schemas:CreateEmptyTableRequest:properties:context","oasType":"schema","type":"unknown","description":"Arbitrary context for a request as key-value pairs.\nHow to use the context is custom to the specific implementation.\n\nREST NAMESPACE ONLY\nContext entries are passed via HTTP headers using the naming convention\n`x-lance-ctx-<key>: <value>`. For example, a context entry\n`{\"trace_id\": \"abc123\"}` would be sent as the header `x-lance-ctx-trace_id: abc123`.\n"}
idstring[]
locationstring

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

Example request

{
  "identity": {
    "api_key": "api_key",
    "auth_token": "auth_token"
  },
  "context": {
    "key": "context"
  },
  "location": "location",
  "id": [
    "id",
    "id"
  ]
}

Response

Table properties result when creating an empty table

transaction_idstring

Optional transaction identifier

locationstring
{"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",
  "storage_options": {
    "key": "storage_options"
  }
}

Changes