REST Resource: hive.v1alpha.projects.catalogs.databases.tables

Resource: HiveTable

Stores the hive table information. It includes the table name, schema (column names and types), data location, storage format, serde info, etc. This message closely matches the Table object in the IMetastoreClient

JSON representation
{
  "name": string,
  "description": string,
  "storageDescriptor": {
    object (StorageDescriptor)
  },
  "createTime": string,
  "partitionKeys": [
    {
      object (FieldSchema)
    }
  ],
  "parameters": {
    string: string,
    ...
  },
  "tableType": string,
  "updateTime": string
}
Fields
name

string

Identifier. The resource name. Format: projects/{project_id_or_number}/catalogs/{catalogId}/databases/{databaseId}/tables/{tableId}

description

string

Optional. Description of the table. The maximum length is 4000 characters.

storageDescriptor

object (StorageDescriptor)

Required. Storage descriptor of the table.

createTime

string (Timestamp format)

Output only. The creation time of the table.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

partitionKeys[]

object (FieldSchema)

Optional. The partition keys of the table.

parameters

map (key: string, value: string)

Optional. Stores the properties associated with the table. The maximum size is 4MiB.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

tableType

string

Output only. The type of the table. This is EXTERNAL for BigLake hive tables.

updateTime

string (Timestamp format)

Output only. The update time of the table.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

StorageDescriptor

Contains information about the physical storage of the table data.

JSON representation
{
  "columns": [
    {
      object (FieldSchema)
    }
  ],
  "locationUri": string,
  "inputFormat": string,
  "outputFormat": string,
  "serdeInfo": {
    object (SerdeInfo)
  },
  "bucketCols": [
    string
  ],
  "sortCols": [
    {
      object (Order)
    }
  ],
  "parameters": {
    string: string,
    ...
  },
  "skewedInfo": {
    object (SkewedInfo)
  },
  "compressed": boolean,
  "numBuckets": integer,
  "storedAsSubDirs": boolean
}
Fields
columns[]

object (FieldSchema)

Required. Specifies the columns of the table.

locationUri

string

Optional. The Cloud storage uri where the table is located. Defaults to <database_location_uri>/<table_name>. The maximum length is 4000 characters.

inputFormat

string

Optional. The fully qualified Java class name of the input format. The maximum length is 4000 characters.

outputFormat

string

Optional. The fully qualified Java class name of the output format. The maximum length is 4000 characters.

serdeInfo

object (SerdeInfo)

Optional. Serialization and deserialization information.

bucketCols[]

string

Optional. Reducer grouping columns and clustering columns and bucketing columns

sortCols[]

object (Order)

Optional. Sort order of the data in each bucket

parameters

map (key: string, value: string)

Optional. Key-value pairs for the storage descriptor. The maximum size is 10Kib.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

skewedInfo

object (SkewedInfo)

Optional. Table data skew information.

compressed

boolean

Optional. Whether the table is compressed.

numBuckets

integer

Optional. The number of buckets in the table.

storedAsSubDirs

boolean

Optional. Whether the table is stored as sub directories.

FieldSchema

Field schema information.

JSON representation
{
  "name": string,
  "type": string,
  "comment": string
}
Fields
name

string

Required. Name of the field. The maximum length is 767 characters.

type

string

Required. Type of the field. The maximum length is 128 characters.

comment

string

Optional. Comment of the field. The maximum length is 256 characters.

SerdeInfo

Serialization and deserialization information.

JSON representation
{
  "name": string,
  "serializationLib": string,
  "description": string,
  "parameters": {
    string: string,
    ...
  },
  "serializerClass": string,
  "deserializerClass": string,
  "serdeType": enum (SerdeType)
}
Fields
name

string

Required. Name of the SerDe. Table name by default. The maximum length is 128 characters.

serializationLib

string

Required. The fully qualified Java class name of the serialization library. The maximum length is 4000 characters.

description

string

Optional. Description of the serde. The maximum length is 4000 characters.

parameters

map (key: string, value: string)

Optional. Parameters of the serde. The maximum size is 10Kib.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

serializerClass

string

Optional. The fully qualified Java class name of the serializer. The maximum length is 4000 characters.

deserializerClass

string

Optional. The fully qualified Java class name of the deserializer. The maximum length is 4000 characters.

serdeType

enum (SerdeType)

Optional. The serde type.

SerdeType

The serde types.

Enums
SERDE_TYPE_UNSPECIFIED The serde type is not specified.
HIVE Hive.
SCHEMA_REGISTRY Schema registry.

Order

Sort order of the stored data per column.

JSON representation
{
  "col": string,
  "order": integer
}
Fields
col

string

Required. The column name. The maximum length is 767 characters.

order

integer

Required. Defines the sort order of the column. Ascending if 1, descending if 0.

SkewedInfo

Stores all the information about skewed table.

JSON representation
{
  "skewedColNames": [
    string
  ],
  "skewedColValues": [
    {
      object (SkewedColumnValue)
    }
  ],
  "skewedKeyValuesLocations": [
    {
      object (SkewedKeyValuesLocation)
    }
  ]
}
Fields
skewedColNames[]

string

Required. The column names that are skewed. The maximum length is 256 characters per column name.

skewedColValues[]

object (SkewedColumnValue)

Required. The skewed column values.

skewedKeyValuesLocations[]

object (SkewedKeyValuesLocation)

Required. The skewed key values locations.

SkewedColumnValue

The skewed column values.

JSON representation
{
  "values": [
    string
  ]
}
Fields
values[]

string

Required. The skewed column values. The maximum length is 256 characters per value.

SkewedKeyValuesLocation

The skewed key values and their corresponding location.

JSON representation
{
  "values": [
    string
  ],
  "location": string
}
Fields
values[]

string

Required. The skewed column values. The maximum length is 256 characters per value.

location

string

Required. The location of the skewed column values. The maximum length is 4000 characters.

Methods

create

Creates a new hive table.

delete

Deletes an existing table specified by the table name.

get

Gets the table specified by the resource name.

list

List all hive tables in a specified project under the hive catalog and database.

patch

Updates an existing table specified by the table name.