Data
Alter name, type, or nullability of a column
API Documentation
Tables
Data
Data
Alter name, type, or nullability of a column
Alter the name, type, or nullability of a column.
POST
/
v1
/
table
/
{name}
/
alter_columns
curl --request POST \
--url https://{db}.{region}.api.lancedb.com/v1/table/{name}/alter_columns/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"alterations": [
{
"path": "outer.inner",
"rename": "new_name",
"data_type": {
"type": "int64",
"fields": [
{
"name": "<string>",
"type": {},
"nullable": true
}
],
"length": 123
},
"nullable": true
}
]
}'
This response does not have an example.
Authorizations
Path Parameters
name of the table
Body
application/json
The path to the column to alter. To reference a nested column, separate pieces by dots.
Example:
"outer.inner"
The new name of the column. If not provided, the name will not be changed.
Example:
"new_name"
Example:
"int64"
Whether the column can contain null values. If not provided, the nullability will not be changed.
Response
200
Update successful
curl --request POST \
--url https://{db}.{region}.api.lancedb.com/v1/table/{name}/alter_columns/ \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"alterations": [
{
"path": "outer.inner",
"rename": "new_name",
"data_type": {
"type": "int64",
"fields": [
{
"name": "<string>",
"type": {},
"nullable": true
}
],
"length": 123
},
"nullable": true
}
]
}'
This response does not have an example.