/alter/table/metadata

URL: https://<aws.fqdn>/<aws.cluster.name>/gpudb-0/alter/table/metadata

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.

Input Parameter Description

NameTypeDescription
table_namesarray of stringsNames 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.
metadata_mapmap of string to stringsA 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.
optionsmap of string to stringsOptional parameters. The default value is an empty map ( {} ).

Output Parameter Description

The GPUdb server embeds the endpoint response inside a standard response structure which contains status information and the actual response to the query. Here is a description of the various fields of the wrapper:

NameTypeDescription
statusString'OK' or 'ERROR'
messageStringEmpty if success or an error message
data_typeString'alter_table_metadata_response' or 'none' in case of an error
dataStringEmpty string
data_strJSON or String

This embedded JSON represents the result of the /alter/table/metadata endpoint:

NameTypeDescription
table_namesarray of stringsValue of input parameter table_names.
metadata_mapmap of string to stringsValue of input parameter metadata_map.
infomap of string to stringsAdditional information.

Empty string in case of an error.