> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# alter_table_metadata

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/alter_table_metadata.rs#L29-L40)
pub async fn [alter\_table\_metadata](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/alter-table-metadata.md#method.alter_table_metadata)( \&self, table\_names: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, metadata\_map: [HashMap](https://doc.rust-lang.org/1.98.1/std/collections/hash/map/struct.HashMap.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[AlterTableMetadataResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterTableMetadataResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Alter metadata for tablesUpdates (adds or changes) metadata for tables. The metadata key and values must both be strings. This is an easy way to annotate whole tables rather than single records within tables. Some examples of metadata are owner of the table, table creation timestamp etc.

##### Arguments

<ul>
  <li>`table_names` - Names of the tables whose metadata will be updated, in \[schema\_name.]table\_name format, using standard name resolution rules. All specified tables must exist, or an error will be returned.</li>
  <li>`metadata_map` - A map which contains the metadata of the tables that are to be updated. Note that only one map is provided for all the tables; so the change will be applied to every table. If the provided map is empty, then all existing metadata for the table(s) will be cleared.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/alter_table_metadata.rs#L61-L79)
pub async fn [alter\_table\_metadata\_with\_opts](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/alter-table-metadata.md#method.alter_table_metadata_with_opts)( \&self, table\_names: [Vec](https://doc.rust-lang.org/1.98.1/alloc/vec/struct.Vec.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, metadata\_map: [HashMap](https://doc.rust-lang.org/1.98.1/std/collections/hash/map/struct.HashMap.html)\<[String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html), [String](https://doc.rust-lang.org/1.98.1/alloc/string/struct.String.html)>, options: [AlterTableMetadataRequestOptions](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterTableMetadataRequestOptions.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[AlterTableMetadataResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterTableMetadataResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Alter metadata for tablesUpdates (adds or changes) metadata for tables. The metadata key and values must both be strings. This is an easy way to annotate whole tables rather than single records within tables. Some examples of metadata are owner of the table, table creation timestamp etc.

##### Arguments

<ul>
  <li>`table_names` - Names of the tables whose metadata will be updated, in \[schema\_name.]table\_name format, using standard name resolution rules. All specified tables must exist, or an error will be returned.</li>
  <li>`metadata_map` - A map which contains the metadata of the tables that are to be updated. Note that only one map is provided for all the tables; so the change will be applied to every table. If the provided map is empty, then all existing metadata for the table(s) will be cleared.</li>
  <li>`options` - The optional parameters; any left unset take the server’s defaults.</li>
</ul>

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/alter_table_metadata.rs#L82-L93)
pub async fn [alter\_table\_metadata\_raw](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/alter-table-metadata.md#method.alter_table_metadata_raw)( \&self, request: &[AlterTableMetadataRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterTableMetadataRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[AlterTableMetadataResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterTableMetadataResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`AlterTableMetadataRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterTableMetadataRequest) to the `/alter/table/metadata` endpoint.

[Source](https://github.com/kineticadb/kinetica-api-rust/blob/master/crates/gpudb-api/src/generated/alter_table_metadata.rs#L97-L109)
pub async fn [alter\_table\_metadata\_from\_url](https://docs.kinetica.com/content/api/rust/gpudb/struct.Kinetica/alter-table-metadata.md#method.alter_table_metadata_from_url)( \&self, url: &[str](https://doc.rust-lang.org/1.98.1/std/primitive.str.html), request: &[AlterTableMetadataRequest](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterTableMetadataRequest.md), ) -> [Result](https://doc.rust-lang.org/1.98.1/core/result/enum.Result.html)\<[AlterTableMetadataResponse](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterTableMetadataResponse.md), [KineticaError](https://docs.kinetica.com/content/api/rust/errors/enum.KineticaError.md)>

Sends a pre-built [`AlterTableMetadataRequest`](https://docs.kinetica.com/content/api/rust/generated/api/struct.AlterTableMetadataRequest) to a specific worker URL, bypassing HA head-node selection. Used for multi-head access.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.