Table
Metadata
Transaction
Atomically commit a batch of mixed table operations
Atomically commit a batch of table operations. This is a generalized version of BatchCreateTableVersions that supports mixed operation types within a single atomic transaction at the metadata layer.
Supported operation types:
- DeclareTable: Declare (reserve) a new table
- CreateTableVersion: Create a new version entry for a table
- DeleteTableVersions: Delete version ranges from a table
- DeregisterTable: Deregister (soft-delete) a table
All operations are committed atomically: either all succeed or none are applied.
post/v1/table/batch-commit
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
Example request
{
"operations": [
{
"deregister_table": {
"identity": {
"api_key": "api_key",
"auth_token": "auth_token"
},
"context": {
"key": "context"
},
"id": [
"id",
"id"
]
},
"create_table_version": {
"naming_scheme": "V2",
"metadata": {
"key": "metadata"
},
"manifest_path": "manifest_path",
"identity": {
"api_key": "api_key",
"auth_token": "auth_token"
},
"manifest_size": 0,
"context": {
"key": "context"
},
"id": [
"id",
"id"
],
"e_tag": "e_tag",
"version": 0,
"branch": "branch"
},
"delete_table_versions": {
"ranges": [
{
"start_version": 0,
"end_version": 6
},
{
"start_version": 0,
"end_version": 6
}
],
"identity": {
"api_key": "api_key",
"auth_token": "auth_token"
},
"context": {
"key": "context"
},
"id": [
"id",
"id"
],
"branch": "branch"
},
"declare_table": {
"identity": {
"api_key": "api_key",
"auth_token": "auth_token"
},
"context": {
"key": "context"
},
"location": "location",
"id": [
"id",
"id"
],
"properties": {
"key": "properties"
},
"vend_credentials": true
}
},
{
"deregister_table": {
"identity": {
"api_key": "api_key",
"auth_token": "auth_token"
},
"context": {
"key": "context"
},
"id": [
"id",
"id"
]
},
"create_table_version": {
"naming_scheme": "V2",
"metadata": {
"key": "metadata"
},
"manifest_path": "manifest_path",
"identity": {
"api_key": "api_key",
"auth_token": "auth_token"
},
"manifest_size": 0,
"context": {
"key": "context"
},
"id": [
"id",
"id"
],
"e_tag": "e_tag",
"version": 0,
"branch": "branch"
},
"delete_table_versions": {
"ranges": [
{
"start_version": 0,
"end_version": 6
},
{
"start_version": 0,
"end_version": 6
}
],
"identity": {
"api_key": "api_key",
"auth_token": "auth_token"
},
"context": {
"key": "context"
},
"id": [
"id",
"id"
],
"branch": "branch"
},
"declare_table": {
"identity": {
"api_key": "api_key",
"auth_token": "auth_token"
},
"context": {
"key": "context"
},
"location": "location",
"id": [
"id",
"id"
],
"properties": {
"key": "properties"
},
"vend_credentials": true
}
}
],
"identity": {
"api_key": "api_key",
"auth_token": "auth_token"
},
"context": {
"key": "context"
}
}Response
Result of atomically committing a batch of mixed table operations
Example response
{
"transaction_id": "transaction_id",
"context": {
"key": "context"
},
"results": [
{
"deregister_table": {
"transaction_id": "transaction_id",
"context": {
"key": "context"
},
"location": "location",
"id": [
"id",
"id"
],
"properties": {
"owner": "Ralph",
"created_at": "1452120468"
}
},
"create_table_version": {
"transaction_id": "transaction_id",
"context": {
"key": "context"
},
"version": {
"metadata": {
"key": "metadata"
},
"manifest_path": "manifest_path",
"timestamp_millis": 1,
"manifest_size": 0,
"e_tag": "e_tag",
"version": 0
}
},
"delete_table_versions": {
"transaction_id": "transaction_id",
"context": {
"key": "context"
},
"deleted_count": 0
},
"declare_table": {
"transaction_id": "transaction_id",
"context": {
"key": "context"
},
"location": "location",
"properties": {
"owner": "Ralph",
"created_at": "1452120468"
},
"managed_versioning": true,
"storage_options": {
"key": "storage_options"
}
}
},
{
"deregister_table": {
"transaction_id": "transaction_id",
"context": {
"key": "context"
},
"location": "location",
"id": [
"id",
"id"
],
"properties": {
"owner": "Ralph",
"created_at": "1452120468"
}
},
"create_table_version": {
"transaction_id": "transaction_id",
"context": {
"key": "context"
},
"version": {
"metadata": {
"key": "metadata"
},
"manifest_path": "manifest_path",
"timestamp_millis": 1,
"manifest_size": 0,
"e_tag": "e_tag",
"version": 0
}
},
"delete_table_versions": {
"transaction_id": "transaction_id",
"context": {
"key": "context"
},
"deleted_count": 0
},
"declare_table": {
"transaction_id": "transaction_id",
"context": {
"key": "context"
},
"location": "location",
"properties": {
"owner": "Ralph",
"created_at": "1452120468"
},
"managed_versioning": true,
"storage_options": {
"key": "storage_options"
}
}
}
]
}