Skip to main content
alter_table_metadata(table_names=None, metadata_map=None, options=)[source]

Updates (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.

Parameters

table_names (list of str) –

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. The user can provide a single element (which will be automatically promoted to a list internally) or a list.

metadata_map (dict of str to str) –

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.

options (dict of str to str) –

Optional parameters. The default value is an empty dict ( ).

Returns

A dict with the following entries–

table_names (list of str) –

Value of input parameter table_names.

metadata_map (dict of str to str) –

Value of input parameter metadata_map.

info (dict of str to str) –

Additional information.