Method: hive.v1alpha.projects.catalogs.databases.tables.partitions.batchCreate

Adds partitions to a table.

HTTP request

POST https://biglake.googleapis.com/hive/v1alpha/{parent=projects/*/catalogs/*/databases/*/tables/*}/partitions:batchCreate

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. Reference to the table to where the partitions to be added, in the format of projects/{project}/catalogs/{catalogs}/databases/{database}/tables/{table}.

Request body

The request body contains data with the following structure:

JSON representation
{
  "requests": [
    {
      object (CreatePartitionRequest)
    }
  ],
  "skipExistingPartitions": boolean
}
Fields
requests[]

object (CreatePartitionRequest)

Required. Requests to add partitions to the table.

skipExistingPartitions

boolean

Optional. Corresponds to the ifNotExists flag in the Hive Metastore APIs. If the flag is set to false, the server will return ALREADY_EXISTS if any partition already exists. If the flag is set to true, the server will skip existing partitions and insert only the non-existing partitions. A maximum of 900 partitions can be inserted in a batch.

Response body

Response message for partitions.batchCreate.

If successful, the response body contains data with the following structure:

JSON representation
{
  "partitions": [
    {
      object (Partition)
    }
  ]
}
Fields
partitions[]

object (Partition)

The list of partitions that have been added.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/bigquery
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

CreatePartitionRequest

Request message for CreatePartition. The Partition is uniquely identified by values, which is an ordered list. Hence, there is no separate name or partition id field.

JSON representation
{
  "parent": string,
  "partition": {
    object (Partition)
  }
}
Fields
parent

string

Required. Reference to the table to where the partition to be added, in the format of projects/{project}/catalogs/{catalogs}/databases/{databases}/tables/{table}.

partition

object (Partition)

Required. The partition to be added.