Update table metadata location

更新时间:
复制 MD 格式

Updates the metadata location for a specified table, typically after committing a new Iceberg metadata snapshot.

Usage notes

  • The --version-token parameter enables optimistic locking. Obtain the current versionToken by running get-table-metadata-location, then pass it to this parameter. If another client updates the metadata location between your read and write, the operation fails to prevent concurrent overwrites.

  • --metadata-location must be a valid Iceberg metadata file path.

  • Both --metadata-location and --version-token are required.

Command format

ossutil tables-api update-table-metadata-location --table-bucket-arn value --namespace value --name value --metadata-location value --version-token value [flags]

Parameter

Type

Description

--metadata-location

string

Path to the new Iceberg metadata file. Required.

--name

string

Table name. Required.

--namespace

string

Namespace of the table. Required.

--table-bucket-arn

string

ARN of the Table Bucket, in the format acs:osstables:{region}:{uid}:bucket/{bucket-name}. Required.

--version-token

string

Version token for optimistic locking. Retrieve the current token by running get-table-metadata-location. Required.

Note

Examples

Update the metadata location for my_table with a new metadata path and version token.

ossutil tables-api update-table-metadata-location --table-bucket-arn acs:osstables:cn-hangzhou:1234567890:bucket/my-table-bucket --namespace my_namespace --name my_table --metadata-location oss://my-table-bucket/metadata/my_namespace/my_table/metadata/00001-abc123.metadata.json --version-token abc123def456