Skip to main content

Update view

PUT 

/metalakes/:metalake/catalogs/:catalog/schemas/:schema/views/:view

Applies one or more changes to a view, such as a rename, property changes or a replacement of its body, and returns the updated view. When authorization is enabled, only an owner of the view or of an object that contains it can update the view.

Sign in with a bearer token or a local user's password; see Authentication.

Request​

Path Parameters

    metalake stringrequired

    The name of the metalake

    catalog stringrequired

    The name of the catalog

    schema stringrequired

    The name of the schema

    view stringrequired

    The name of the view

Body

    updates

    object[]

    required

    Possible values: >= 1

  • Array [

  • oneOf

    @type stringrequired

    Possible values: [rename]

    newName stringrequired

    The new name of the view

  • ]

Responses​

The view, with its columns, SQL representations, default catalog and schema, comment, properties and audit information.

Schema

    code int32

    Possible values: [0]

    Status code of the response

    view

    object

    name stringrequired

    The name of the view

    comment stringnullable

    The comment of the view

    columns

    object[]

    required

    The output columns of the view

  • Array [

  • name stringrequired

    The name of the column

    type

    object

    required

    The general, read-compatible data type representation. UnparsedType preserves types that the current server cannot resolve when reading existing metadata. Endpoints that require resolved new metadata use WritableDataType instead.

    oneOf

    The string name of a primitive type, such as boolean, byte, byte unsigned, short, short unsigned, integer, integer unsigned, long, long unsigned, float, double, decimal(10,2), date, time(3), timestamp(3), timestamp_tz(3), string, char(10), varchar(10), interval_day, interval_year, uuid, fixed(16) or binary.

    string

    comment stringnullable

    The comment of the column

    nullable booleannullable

    Default value: true

    Whether the column is nullable

    defaultValue

    object

    oneOf

    type string

    Possible values: [literal]

    dataType

    object

    required

    The general, read-compatible data type representation. UnparsedType preserves types that the current server cannot resolve when reading existing metadata. Endpoints that require resolved new metadata use WritableDataType instead.

    oneOf

    The string name of a primitive type, such as boolean, byte, byte unsigned, short, short unsigned, integer, integer unsigned, long, long unsigned, float, double, decimal(10,2), date, time(3), timestamp(3), timestamp_tz(3), string, char(10), varchar(10), interval_day, interval_year, uuid, fixed(16) or binary.

    string

    value stringrequired

    The string format of the literal value

    autoIncrement booleannullable

    Whether the column is auto increment

  • ]

  • representations

    object[]

    required

    The representations of the view, keyed by dialect

  • Array [

  • oneOf

    type stringrequired

    Possible values: [sql]

    The representation type discriminator

    dialect stringrequired

    The SQL dialect of this representation

    sql stringrequired

    The SQL text of the view

  • ]

  • defaultCatalog stringnullable

    The default catalog used to resolve unqualified identifiers in the view representations

    defaultSchema stringnullable

    The default schema used to resolve unqualified identifiers in the view representations

    properties

    object

    nullable

    The properties of the view

    property name* string

    audit

    object

    required

    Audit information for a Gravitino resource.

    creator string

    The user who created the resource

    createTime date-time

    The time the resource was created

    lastModifier string

    The user who last modified the resource

    lastModifiedTime date-time

    The time the resource was last modified

Loading...