Skip to main content

Load a table from the catalog

GET 

/v1/:prefix/namespaces/:namespace/tables/:table

Load a table from the catalog.

The response contains both configuration and table metadata. The configuration, if non-empty is used as additional configuration for the table that overrides catalog configuration. For example, this configuration may change the FileIO implementation to be used for the table.

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

The catalog configuration may contain credentials that should be used for subsequent requests for the table. The configuration key "token" is used to pass an access token to be used as a bearer token for table 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

    table stringrequired

    A table name

    Example: sales

Query Parameters

    snapshots string

    Possible values: [all, refs]

    The snapshots to return in the body of the metadata via the snapshots field. Setting the value to all would return the full set of snapshots currently valid for the table. Setting the value to refs would load all snapshots referenced by branches or tags. Default if no param is provided is all.

    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

Header Parameters

    X-Iceberg-Access-Delegation string

    Possible values: [vended-credentials, remote-signing]

    Optional signal to the server that the client supports delegated access via a comma-separated list of access mechanisms. The server may choose to supply access via any or none of the requested mechanisms.

    Specific properties and handling for vended-credentials and remote-signing are documented in the LoadTableResult schema section of this spec document.

    Example: vended-credentials,remote-signing
    If-None-Match string

    An optional header that allows the server to return 304 (Not Modified) if the metadata is current. The content is the value of the ETag received in a CreateTableResponse, LoadTableResponse or CommitTableResponse.

Responses​

Table metadata result when loading a table

Response Headers

  • etag

    string

    Identifies a unique version of the table metadata. Implementations that support ETags should produce unique tags for responses that return different metadata content but represent the same version of table metadata. For example, the snapshots query parameter may result in different metadata representations depending on whether refs or all is provided, therefore should have distinct ETags.

Schema

    metadata-location stringnullable

    May be null if the table is staged as part of a transaction

    metadata

    object

    required

    format-version integerrequired

    Possible values: >= 1 and <= 3

    table-uuid stringrequired
    location string
    last-updated-ms int64
    next-row-id int64

    A long higher than all assigned row IDs; the next snapshot's first-row-id.

    properties

    object

    property name* string
    schemas object[]
    current-schema-id integer
    last-column-id integer

    partition-specs

    object[]

  • Array [

  • spec-id integer

    fields

    object[]

    required

  • Array [

  • field-id integer
    source-id integerrequired
    name stringrequired
    transform Transform (string)required
  • ]

  • ]

  • default-spec-id integer
    last-partition-id integer

    sort-orders

    object[]

  • Array [

  • order-id integerrequired

    fields

    object[]

    required

  • Array [

  • source-id integerrequired
    transform Transform (string)required
    direction SortDirection (string)required

    Possible values: [asc, desc]

    null-order NullOrder (string)required

    Possible values: [nulls-first, nulls-last]

  • ]

  • ]

  • default-sort-order-id integer

    encryption-keys

    object[]

  • Array [

  • key-id stringrequired
    encrypted-key-metadata byterequired
    encrypted-by-id string

    properties

    object

    property name* string
  • ]

  • snapshots

    object[]

  • Array [

  • snapshot-id int64required
    parent-snapshot-id int64
    sequence-number int64
    timestamp-ms int64required
    manifest-list stringrequired

    Location of the snapshot's manifest list file

    first-row-id int64

    The first _row_id assigned to the first row in the first data file in the first manifest

    added-rows int64

    The upper bound of the number of rows with assigned row IDs

    summary

    object

    required

    operation stringrequired

    Possible values: [append, replace, overwrite, delete]

    property name* string
    schema-id integer
  • ]

  • refs

    object

    property name*

    SnapshotReference

    type stringrequired

    Possible values: [tag, branch]

    snapshot-id int64required
    max-ref-age-ms int64
    max-snapshot-age-ms int64
    min-snapshots-to-keep integer
    current-snapshot-id int64
    last-sequence-number int64

    snapshot-log

    object[]

  • Array [

  • snapshot-id int64required
    timestamp-ms int64required
  • ]

  • metadata-log

    object[]

  • Array [

  • metadata-file stringrequired
    timestamp-ms int64required
  • ]

  • statistics

    object[]

  • Array [

  • snapshot-id int64required
    statistics-path stringrequired
    file-size-in-bytes int64required
    file-footer-size-in-bytes int64required

    blob-metadata

    object[]

    required

  • Array [

  • type stringrequired
    snapshot-id int64required
    sequence-number int64required
    fields integer[]required

    properties

    object

    property name* string
  • ]

  • ]

  • partition-statistics

    object[]

  • Array [

  • snapshot-id int64required
    statistics-path stringrequired
    file-size-in-bytes int64required
  • ]

  • config

    object

    property name* string

    storage-credentials

    object[]

  • Array [

  • prefix stringrequired

    Indicates a storage location prefix where the credential is relevant. Clients should choose the most specific prefix (by selecting the longest prefix) if several credentials of the same type are available.

    config

    object

    required

    property name* string
  • ]

Loading...