Skip to content

Commit 470bc21

Browse files
feat: Add BigQuery Metastore Partition Service API version v1beta (#941)
* feat: Add BigQuery Metastore Partition Service API version v1beta PiperOrigin-RevId: 753333720 Source-Link: googleapis/googleapis@389abd1 Source-Link: https://github.com/googleapis/googleapis-gen/commit/a87588791ac0057b5bcd5b91e497a5daff66ebbc Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYTg3NTg4NzkxYWMwMDU3YjViY2Q1YjkxZTQ5N2E1ZGFmZjY2ZWJiYyJ9 * update replacement in owlbot.py * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * Add gapic_version.py * update gapic_version.py * update docs/index.rst --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 03272ac commit 470bc21

13 files changed

+1356
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for BatchCreateMetastorePartitions
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_v1beta_generated_MetastorePartitionService_BatchCreateMetastorePartitions_async]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import bigquery_storage_v1beta
35+
36+
37+
async def sample_batch_create_metastore_partitions():
38+
# Create a client
39+
client = bigquery_storage_v1beta.MetastorePartitionServiceAsyncClient()
40+
41+
# Initialize request argument(s)
42+
requests = bigquery_storage_v1beta.CreateMetastorePartitionRequest()
43+
requests.parent = "parent_value"
44+
requests.metastore_partition.values = ["values_value1", "values_value2"]
45+
46+
request = bigquery_storage_v1beta.BatchCreateMetastorePartitionsRequest(
47+
parent="parent_value",
48+
requests=requests,
49+
)
50+
51+
# Make the request
52+
response = await client.batch_create_metastore_partitions(request=request)
53+
54+
# Handle the response
55+
print(response)
56+
57+
58+
# [END bigquerystorage_v1beta_generated_MetastorePartitionService_BatchCreateMetastorePartitions_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for BatchCreateMetastorePartitions
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_v1beta_generated_MetastorePartitionService_BatchCreateMetastorePartitions_sync]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import bigquery_storage_v1beta
35+
36+
37+
def sample_batch_create_metastore_partitions():
38+
# Create a client
39+
client = bigquery_storage_v1beta.MetastorePartitionServiceClient()
40+
41+
# Initialize request argument(s)
42+
requests = bigquery_storage_v1beta.CreateMetastorePartitionRequest()
43+
requests.parent = "parent_value"
44+
requests.metastore_partition.values = ["values_value1", "values_value2"]
45+
46+
request = bigquery_storage_v1beta.BatchCreateMetastorePartitionsRequest(
47+
parent="parent_value",
48+
requests=requests,
49+
)
50+
51+
# Make the request
52+
response = client.batch_create_metastore_partitions(request=request)
53+
54+
# Handle the response
55+
print(response)
56+
57+
58+
# [END bigquerystorage_v1beta_generated_MetastorePartitionService_BatchCreateMetastorePartitions_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for BatchDeleteMetastorePartitions
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_v1beta_generated_MetastorePartitionService_BatchDeleteMetastorePartitions_async]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import bigquery_storage_v1beta
35+
36+
37+
async def sample_batch_delete_metastore_partitions():
38+
# Create a client
39+
client = bigquery_storage_v1beta.MetastorePartitionServiceAsyncClient()
40+
41+
# Initialize request argument(s)
42+
partition_values = bigquery_storage_v1beta.MetastorePartitionValues()
43+
partition_values.values = ["values_value1", "values_value2"]
44+
45+
request = bigquery_storage_v1beta.BatchDeleteMetastorePartitionsRequest(
46+
parent="parent_value",
47+
partition_values=partition_values,
48+
)
49+
50+
# Make the request
51+
await client.batch_delete_metastore_partitions(request=request)
52+
53+
54+
# [END bigquerystorage_v1beta_generated_MetastorePartitionService_BatchDeleteMetastorePartitions_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for BatchDeleteMetastorePartitions
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_v1beta_generated_MetastorePartitionService_BatchDeleteMetastorePartitions_sync]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import bigquery_storage_v1beta
35+
36+
37+
def sample_batch_delete_metastore_partitions():
38+
# Create a client
39+
client = bigquery_storage_v1beta.MetastorePartitionServiceClient()
40+
41+
# Initialize request argument(s)
42+
partition_values = bigquery_storage_v1beta.MetastorePartitionValues()
43+
partition_values.values = ["values_value1", "values_value2"]
44+
45+
request = bigquery_storage_v1beta.BatchDeleteMetastorePartitionsRequest(
46+
parent="parent_value",
47+
partition_values=partition_values,
48+
)
49+
50+
# Make the request
51+
client.batch_delete_metastore_partitions(request=request)
52+
53+
54+
# [END bigquerystorage_v1beta_generated_MetastorePartitionService_BatchDeleteMetastorePartitions_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for BatchUpdateMetastorePartitions
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_v1beta_generated_MetastorePartitionService_BatchUpdateMetastorePartitions_async]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import bigquery_storage_v1beta
35+
36+
37+
async def sample_batch_update_metastore_partitions():
38+
# Create a client
39+
client = bigquery_storage_v1beta.MetastorePartitionServiceAsyncClient()
40+
41+
# Initialize request argument(s)
42+
requests = bigquery_storage_v1beta.UpdateMetastorePartitionRequest()
43+
requests.metastore_partition.values = ["values_value1", "values_value2"]
44+
45+
request = bigquery_storage_v1beta.BatchUpdateMetastorePartitionsRequest(
46+
parent="parent_value",
47+
requests=requests,
48+
)
49+
50+
# Make the request
51+
response = await client.batch_update_metastore_partitions(request=request)
52+
53+
# Handle the response
54+
print(response)
55+
56+
57+
# [END bigquerystorage_v1beta_generated_MetastorePartitionService_BatchUpdateMetastorePartitions_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for BatchUpdateMetastorePartitions
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_v1beta_generated_MetastorePartitionService_BatchUpdateMetastorePartitions_sync]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import bigquery_storage_v1beta
35+
36+
37+
def sample_batch_update_metastore_partitions():
38+
# Create a client
39+
client = bigquery_storage_v1beta.MetastorePartitionServiceClient()
40+
41+
# Initialize request argument(s)
42+
requests = bigquery_storage_v1beta.UpdateMetastorePartitionRequest()
43+
requests.metastore_partition.values = ["values_value1", "values_value2"]
44+
45+
request = bigquery_storage_v1beta.BatchUpdateMetastorePartitionsRequest(
46+
parent="parent_value",
47+
requests=requests,
48+
)
49+
50+
# Make the request
51+
response = client.batch_update_metastore_partitions(request=request)
52+
53+
# Handle the response
54+
print(response)
55+
56+
57+
# [END bigquerystorage_v1beta_generated_MetastorePartitionService_BatchUpdateMetastorePartitions_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for ListMetastorePartitions
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-bigquery-storage
24+
25+
26+
# [START bigquerystorage_v1beta_generated_MetastorePartitionService_ListMetastorePartitions_async]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import bigquery_storage_v1beta
35+
36+
37+
async def sample_list_metastore_partitions():
38+
# Create a client
39+
client = bigquery_storage_v1beta.MetastorePartitionServiceAsyncClient()
40+
41+
# Initialize request argument(s)
42+
request = bigquery_storage_v1beta.ListMetastorePartitionsRequest(
43+
parent="parent_value",
44+
)
45+
46+
# Make the request
47+
response = await client.list_metastore_partitions(request=request)
48+
49+
# Handle the response
50+
print(response)
51+
52+
53+
# [END bigquerystorage_v1beta_generated_MetastorePartitionService_ListMetastorePartitions_async]

0 commit comments

Comments
 (0)