- HTTP request
- Path parameters
- Request body
- Response body
- Authorization scopes
- CreatePartitionRequest
- Try it!
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 |
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 ( |
| Fields | |
|---|---|
requests[] |
Required. Requests to add partitions to the table. |
skipExistingPartitions |
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 ( |
| Fields | |
|---|---|
partitions[] |
The list of partitions that have been added. |
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/bigqueryhttps://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 ( |
| Fields | |
|---|---|
parent |
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 |
Required. The partition to be added. |