Skip to main content

Load a view from the catalog

GET 

/v1/:prefix/namespaces/:namespace/views/:view

Load a view from the catalog.

The response contains both configuration and view metadata. The configuration, if non-empty is used as additional configuration for the view that overrides catalog configuration.

The response also contains the view's full metadata, matching the view metadata JSON file.

The catalog configuration may contain credentials that should be used for subsequent requests for the view. The configuration key "token" is used to pass an access token to be used as a bearer token for view requests. Otherwise, a token may be passed using a RFC 8693 token type as a configuration key. For example, "urn:ietf:params:oauth:token-type:jwt=<JWT-token>".

Request​

Path Parameters

    prefix stringrequired

    The catalog name in Gravitino, as returned in defaults.prefix by GET /v1/config

    namespace stringrequired

    A namespace identifier as a single string. Multipart namespace parts must be separated by the namespace separator as indicated via the /config override namespace-separator, which defaults to the unit separator 0x1F byte (url encoded %1F). To be compatible with older clients, servers must use both the advertised separator and 0x1F as valid separators when decoding namespaces. The namespace-separator should be provided in a url encoded form.

    Examples:

    Example: accounting

    view stringrequired

    A view name

    Example: sales

Query Parameters

    referenced-by string

    A comma-separated list of fully qualified view names (namespace and view name) representing the view reference chain when an entity (table or view) is loaded via a view. The list should be ordered with the outermost view first, followed by any intermediate views it references, down to the view that directly references the entity. For a simple case where a view directly references the entity, the list contains a single view identifier. For nested views (a view referencing another view which references the entity), the list contains multiple view identifiers representing the complete dependency chain. The view identifier is a composite string of the format {namespace}{separator}{viewName}. The namespace-separator (defined in /config) acts as the delimiter. When parsing, the last occurrence of this separator identifies the boundary between the namespace and the view name. Multipart namespaces must follow the encoding rules of the parent parameter in the list namespaces endpoint. Multiple view identifiers are separated by commas. Servers should split the parameter value on comma characters to parse individual view identifiers. If view names contain commas, they must be url-encoded as %2C. Example with multiple views (where prod%1Fanalytics is a nested namespace which has a quarterly_view which references to monthly_view which then references the entity being loaded) - prod%1Fanalytics%1Fquarterly_view,prod%1Fanalytics%1Fmonthly_view

Responses​

View metadata result when loading a view

Schema

    metadata-location stringrequired

    metadata

    object

    required

    view-uuid stringrequired
    format-version integerrequired

    Possible values: >= 1 and <= 1

    location stringrequired
    current-version-id integerrequired

    versions

    object[]

    required

  • Array [

  • version-id integerrequired
    timestamp-ms int64required
    schema-id integerrequired

    Schema ID to set as current, or -1 to set last added schema

    summary

    object

    required

    property name* string

    representations

    object[]

    required

  • Array [

  • oneOf

    type stringrequired
    sql stringrequired
    dialect stringrequired
  • ]

  • default-catalog string
    default-namespace string[]required

    Reference to one or more levels of a namespace

  • ]

  • version-log

    object[]

    required

  • Array [

  • version-id integerrequired
    timestamp-ms int64required
  • ]

  • schemas object[]required

    properties

    object

    property name* string

    config

    object

    property name* string
Loading...