HiveMetastoreServiceAsyncClient(
*,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: typing.Optional[
typing.Union[
str,
google.cloud.biglake_hive_v1beta.services.hive_metastore_service.transports.base.HiveMetastoreServiceTransport,
typing.Callable[
[...],
google.cloud.biglake_hive_v1beta.services.hive_metastore_service.transports.base.HiveMetastoreServiceTransport,
],
]
] = "grpc_asyncio",
client_options: typing.Optional[
google.api_core.client_options.ClientOptions
] = None,
client_info: google.api_core.gapic_v1.client_info.ClientInfo = google.api_core.gapic_v1.client_info.ClientInfo
)Hive Metastore Service is a biglake service that allows users to manage their external Hive catalogs. Full API compatibility with OSS Hive Metastore APIs is not supported. The methods match the Hive Metastore API spec mostly except for a few exceptions. These include listing resources with pattern, environment context which are combined in a single List API, return of ListResponse object instead of a list of resources, transactions, locks, etc.
The BigLake Hive Metastore API defines the following resources:
- A collection of Google Cloud projects:
/projects/* - Each project has a collection of catalogs:
/catalogs/* - Each catalog has a collection of databases:
/databases/* - Each database has a collection of tables:
/tables/*
Properties
api_endpoint
Return the API endpoint used by the client instance.
| Returns | |
|---|---|
| Type | Description |
str |
The API endpoint used by the client instance. |
transport
Returns the transport used by the client instance.
| Returns | |
|---|---|
| Type | Description |
HiveMetastoreServiceTransport |
The transport used by the client instance. |
universe_domain
Return the universe domain used by the client instance.
| Returns | |
|---|---|
| Type | Description |
str |
The universe domain used by the client instance. |
Methods
HiveMetastoreServiceAsyncClient
HiveMetastoreServiceAsyncClient(
*,
credentials: typing.Optional[google.auth.credentials.Credentials] = None,
transport: typing.Optional[
typing.Union[
str,
google.cloud.biglake_hive_v1beta.services.hive_metastore_service.transports.base.HiveMetastoreServiceTransport,
typing.Callable[
[...],
google.cloud.biglake_hive_v1beta.services.hive_metastore_service.transports.base.HiveMetastoreServiceTransport,
],
]
] = "grpc_asyncio",
client_options: typing.Optional[
google.api_core.client_options.ClientOptions
] = None,
client_info: google.api_core.gapic_v1.client_info.ClientInfo = google.api_core.gapic_v1.client_info.ClientInfo
)Instantiates the hive metastore service async client.
| Parameters | |
|---|---|
| Name | Description |
credentials |
Optional[google.auth.credentials.Credentials]
The authorization credentials to attach to requests. These credentials identify the application to the service; if none are specified, the client will attempt to ascertain the credentials from the environment. |
transport |
Optional[Union[str,HiveMetastoreServiceTransport,Callable[..., HiveMetastoreServiceTransport]]]
The transport to use, or a Callable that constructs and returns a new transport to use. If a Callable is given, it will be called with the same set of initialization arguments as used in the HiveMetastoreServiceTransport constructor. If set to None, a transport is chosen automatically. |
client_options |
Optional[Union[google.api_core.client_options.ClientOptions, dict]]
Custom options for the client. 1. The |
client_info |
google.api_core.gapic_v1.client_info.ClientInfo
The client info used to send a user-agent string along with API requests. If |
| Exceptions | |
|---|---|
| Type | Description |
google.auth.exceptions.MutualTlsChannelError |
If mutual TLS transport creation failed for any reason. |
batch_create_partitions
batch_create_partitions(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.BatchCreatePartitionsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.biglake_hive_v1beta.types.hive_metastore.BatchCreatePartitionsResponse
)Adds partitions to a table.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_batch_create_partitions():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
requests = biglake_hive_v1beta.CreatePartitionRequest()
requests.parent = "parent_value"
requests.partition.values = ['values_value1', 'values_value2']
request = biglake_hive_v1beta.BatchCreatePartitionsRequest(
parent="parent_value",
requests=requests,
)
# Make the request
response = await client.batch_create_partitions(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.BatchCreatePartitionsRequest, dict]]
The request object. Request message for the BatchCreatePartitions method. |
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}. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.biglake_hive_v1beta.types.BatchCreatePartitionsResponse |
Response message for BatchCreatePartitions. |
batch_delete_partitions
batch_delete_partitions(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.BatchDeletePartitionsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> NoneDeletes partitions from a table.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_batch_delete_partitions():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
partition_values = biglake_hive_v1beta.PartitionValues()
partition_values.values = ['values_value1', 'values_value2']
request = biglake_hive_v1beta.BatchDeletePartitionsRequest(
parent="parent_value",
partition_values=partition_values,
)
# Make the request
await client.batch_delete_partitions(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.BatchDeletePartitionsRequest, dict]]
The request object. Request message for BatchDeletePartitions. The Partition is uniquely identified by values, which is an ordered list. Hence, there is no separate name or partition id field. |
parent |
Required. Reference to the table to which these partitions belong, in the format of projects/{project}/catalogs/{catalogs}/databases/{database}/tables/{table}. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
batch_update_partitions
batch_update_partitions(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.BatchUpdatePartitionsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.biglake_hive_v1beta.types.hive_metastore.BatchUpdatePartitionsResponse
)Updates partitions in a table.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_batch_update_partitions():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
requests = biglake_hive_v1beta.UpdatePartitionRequest()
requests.partition.values = ['values_value1', 'values_value2']
request = biglake_hive_v1beta.BatchUpdatePartitionsRequest(
parent="parent_value",
requests=requests,
)
# Make the request
response = await client.batch_update_partitions(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.BatchUpdatePartitionsRequest, dict]]
The request object. Request message for BatchUpdatePartitions. |
parent |
Required. Reference to the table to which these partitions belong, in the format of projects/{project}/catalogs/{catalogs}/databases/{database}/tables/{table}. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.biglake_hive_v1beta.types.BatchUpdatePartitionsResponse |
Response message for BatchUpdatePartitions. |
catalog_path
catalog_path(project: str, catalog: str) -> strReturns a fully-qualified catalog string.
common_billing_account_path
common_billing_account_path(billing_account: str) -> strReturns a fully-qualified billing_account string.
common_folder_path
common_folder_path(folder: str) -> strReturns a fully-qualified folder string.
common_location_path
common_location_path(project: str, location: str) -> strReturns a fully-qualified location string.
common_organization_path
common_organization_path(organization: str) -> strReturns a fully-qualified organization string.
common_project_path
common_project_path(project: str) -> strReturns a fully-qualified project string.
create_hive_catalog
create_hive_catalog(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.CreateHiveCatalogRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
hive_catalog: typing.Optional[
google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveCatalog
] = None,
hive_catalog_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveCatalogCreates a new hive catalog.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_create_hive_catalog():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
hive_catalog = biglake_hive_v1beta.HiveCatalog()
hive_catalog.location_uri = "location_uri_value"
request = biglake_hive_v1beta.CreateHiveCatalogRequest(
parent="parent_value",
hive_catalog=hive_catalog,
hive_catalog_id="hive_catalog_id_value",
primary_location="primary_location_value",
)
# Make the request
response = await client.create_hive_catalog(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.CreateHiveCatalogRequest, dict]]
The request object. Request message for the CreateHiveCatalog method. |
parent |
Required. The parent resource where this catalog will be created. Format: projects/{project_id_or_number} This corresponds to the |
hive_catalog |
HiveCatalog
Required. The catalog to create. The |
hive_catalog_id |
Required. The Hive Catalog ID to use for the catalog that will become the final component of the catalog's resource name. The maximum length is 256 characters. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.biglake_hive_v1beta.types.HiveCatalog |
The HiveCatalog contains spark/hive databases and tables in the BigLake Metastore. While creating resources under a catalog, ideally ensure that the storage bucket location, spark / hive engine location or any other compute location match. Catalog can be viewed as the destination for migrating an on-prem Hive metastore to GCP. |
create_hive_database
create_hive_database(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.CreateHiveDatabaseRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
hive_database: typing.Optional[
google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveDatabase
] = None,
hive_database_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveDatabaseCreates a new database.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_create_hive_database():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
request = biglake_hive_v1beta.CreateHiveDatabaseRequest(
parent="parent_value",
hive_database_id="hive_database_id_value",
)
# Make the request
response = await client.create_hive_database(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.CreateHiveDatabaseRequest, dict]]
The request object. Request message for the CreateHiveDatabase method. |
parent |
Required. The parent resource where this database will be created. Format: projects/{project_id_or_number}/catalogs/{catalog_id} This corresponds to the |
hive_database |
HiveDatabase
Required. The database to create. The |
hive_database_id |
Required. The ID to use for the Hive Database. The maximum length is 128 characters. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.biglake_hive_v1beta.types.HiveDatabase |
Stores the hive database information. It includes the database name, description, location and properties associated with the database. |
create_hive_table
create_hive_table(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.CreateHiveTableRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
hive_table: typing.Optional[
google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveTable
] = None,
hive_table_id: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveTableCreates a new hive table.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_create_hive_table():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
hive_table = biglake_hive_v1beta.HiveTable()
hive_table.storage_descriptor.columns.name = "name_value"
hive_table.storage_descriptor.columns.type_ = "type__value"
request = biglake_hive_v1beta.CreateHiveTableRequest(
parent="parent_value",
hive_table=hive_table,
hive_table_id="hive_table_id_value",
)
# Make the request
response = await client.create_hive_table(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.CreateHiveTableRequest, dict]]
The request object. Request message for the CreateHiveTable method. |
parent |
Required. The parent resource for the table to be created. Format: projects/{project_id_or_number}/catalogs/{catalog_id}/databases/{database_id} This corresponds to the |
hive_table |
HiveTable
Required. The Hive Table to create. The |
hive_table_id |
Required. The Hive Table ID to use for the table that will become the final component of the table's resource name. The maximum length is 256 characters. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.biglake_hive_v1beta.types.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 |
delete_hive_catalog
delete_hive_catalog(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.DeleteHiveCatalogRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> NoneDeletes an existing catalog specified by the catalog ID. Delete will fail if the catalog is not empty.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_delete_hive_catalog():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
request = biglake_hive_v1beta.DeleteHiveCatalogRequest(
name="name_value",
)
# Make the request
await client.delete_hive_catalog(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.DeleteHiveCatalogRequest, dict]]
The request object. Request message for the DeleteHiveCatalog method. |
name |
Required. The name of the catalog to delete. Format: projects/{project_id_or_number}/catalogs/{catalog_id} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
delete_hive_database
delete_hive_database(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.DeleteHiveDatabaseRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> NoneDeletes an existing database specified by the database name.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_delete_hive_database():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
request = biglake_hive_v1beta.DeleteHiveDatabaseRequest(
name="name_value",
)
# Make the request
await client.delete_hive_database(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.DeleteHiveDatabaseRequest, dict]]
The request object. Request message for the DeleteHiveDatabase method. |
name |
Required. The name of the database to delete. Format: projects/{project_id_or_number}/catalogs/{catalog_id}/databases/{database_id} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
delete_hive_table
delete_hive_table(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.DeleteHiveTableRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> NoneDeletes an existing table specified by the table name.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_delete_hive_table():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
request = biglake_hive_v1beta.DeleteHiveTableRequest(
name="name_value",
)
# Make the request
await client.delete_hive_table(request=request)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.DeleteHiveTableRequest, dict]]
The request object. Request message for the DeleteHiveTable method. |
name |
Required. The name of the database to delete. Format: projects/{project_id_or_number}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
from_service_account_file
from_service_account_file(filename: str, *args, **kwargs)Creates an instance of this client using the provided credentials file.
| Parameter | |
|---|---|
| Name | Description |
filename |
str
The path to the service account private key json file. |
| Returns | |
|---|---|
| Type | Description |
HiveMetastoreServiceAsyncClient |
The constructed client. |
from_service_account_info
from_service_account_info(info: dict, *args, **kwargs)Creates an instance of this client using the provided credentials info.
| Parameter | |
|---|---|
| Name | Description |
info |
dict
The service account private key info. |
| Returns | |
|---|---|
| Type | Description |
HiveMetastoreServiceAsyncClient |
The constructed client. |
from_service_account_json
from_service_account_json(filename: str, *args, **kwargs)Creates an instance of this client using the provided credentials file.
| Parameter | |
|---|---|
| Name | Description |
filename |
str
The path to the service account private key json file. |
| Returns | |
|---|---|
| Type | Description |
HiveMetastoreServiceAsyncClient |
The constructed client. |
get_hive_catalog
get_hive_catalog(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.GetHiveCatalogRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveCatalogGets the catalog specified by the resource name.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_get_hive_catalog():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
request = biglake_hive_v1beta.GetHiveCatalogRequest(
name="name_value",
)
# Make the request
response = await client.get_hive_catalog(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.GetHiveCatalogRequest, dict]]
The request object. Request message for the GetHiveCatalog method. |
name |
Required. The name of the catalog to retrieve. Format: projects/{project_id_or_number}/catalogs/{catalog_id} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.biglake_hive_v1beta.types.HiveCatalog |
The HiveCatalog contains spark/hive databases and tables in the BigLake Metastore. While creating resources under a catalog, ideally ensure that the storage bucket location, spark / hive engine location or any other compute location match. Catalog can be viewed as the destination for migrating an on-prem Hive metastore to GCP. |
get_hive_database
get_hive_database(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.GetHiveDatabaseRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveDatabaseGets the database specified by the resource name.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_get_hive_database():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
request = biglake_hive_v1beta.GetHiveDatabaseRequest(
name="name_value",
)
# Make the request
response = await client.get_hive_database(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.GetHiveDatabaseRequest, dict]]
The request object. Request message for the GetHiveDatabase method. |
name |
Required. The name of the database to retrieve. Format: projects/{project_id_or_number}/catalogs/{catalog_id}/databases/{database_id} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.biglake_hive_v1beta.types.HiveDatabase |
Stores the hive database information. It includes the database name, description, location and properties associated with the database. |
get_hive_table
get_hive_table(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.GetHiveTableRequest,
dict,
]
] = None,
*,
name: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveTableGets the table specified by the resource name.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_get_hive_table():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
request = biglake_hive_v1beta.GetHiveTableRequest(
name="name_value",
)
# Make the request
response = await client.get_hive_table(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.GetHiveTableRequest, dict]]
The request object. Request message for the GetHiveTable method. |
name |
Required. The name of the table to retrieve. Format: projects/{project_id_or_number}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.biglake_hive_v1beta.types.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 |
get_mtls_endpoint_and_cert_source
get_mtls_endpoint_and_cert_source(
client_options: typing.Optional[
google.api_core.client_options.ClientOptions
] = None,
)Return the API endpoint and client cert source for mutual TLS.
The client cert source is determined in the following order:
(1) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is not "true", the
client cert source is None.
(2) if client_options.client_cert_source is provided, use the provided one; if the
default client cert source exists, use the default one; otherwise the client cert
source is None.
The API endpoint is determined in the following order:
(1) if client_options.api_endpoint if provided, use the provided one.
(2) if GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "always", use the
default mTLS endpoint; if the environment variable is "never", use the default API
endpoint; otherwise if client cert source exists, use the default mTLS endpoint, otherwise
use the default API endpoint.
More details can be found at https://google.aip.dev/auth/4114.
| Parameter | |
|---|---|
| Name | Description |
client_options |
google.api_core.client_options.ClientOptions
Custom options for the client. Only the |
| Exceptions | |
|---|---|
| Type | Description |
google.auth.exceptions.MutualTLSChannelError |
If any errors happen. |
| Returns | |
|---|---|
| Type | Description |
Tuple[str, Callable[[], Tuple[bytes, bytes]]] |
returns the API endpoint and the client cert source to use. |
get_transport_class
get_transport_class(
label: typing.Optional[str] = None,
) -> typing.Type[
google.cloud.biglake_hive_v1beta.services.hive_metastore_service.transports.base.HiveMetastoreServiceTransport
]Returns an appropriate transport class.
| Parameter | |
|---|---|
| Name | Description |
label |
typing.Optional[str]
The name of the desired transport. If none is provided, then the first transport in the registry is used. |
list_hive_catalogs
list_hive_catalogs(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.ListHiveCatalogsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.biglake_hive_v1beta.services.hive_metastore_service.pagers.ListHiveCatalogsAsyncPager
)List all catalogs in a specified project.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_list_hive_catalogs():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
request = biglake_hive_v1beta.ListHiveCatalogsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_hive_catalogs(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.ListHiveCatalogsRequest, dict]]
The request object. Request message for the ListHiveCatalogs method. |
parent |
Required. The project to list catalogs from. Format: projects/{project_id_or_number} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.biglake_hive_v1beta.services.hive_metastore_service.pagers.ListHiveCatalogsAsyncPager |
Response message for the ListHiveCatalogs method. Iterating over this object will yield results and resolve additional pages automatically. |
list_hive_databases
list_hive_databases(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.ListHiveDatabasesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.biglake_hive_v1beta.services.hive_metastore_service.pagers.ListHiveDatabasesAsyncPager
)List all databases in a specified catalog.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_list_hive_databases():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
request = biglake_hive_v1beta.ListHiveDatabasesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_hive_databases(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.ListHiveDatabasesRequest, dict]]
The request object. Request message for the ListHiveDatabases method. |
parent |
Required. The hive catalog to list databases from. Format: projects/{project_id_or_number}/catalogs/{catalog_id} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.biglake_hive_v1beta.services.hive_metastore_service.pagers.ListHiveDatabasesAsyncPager |
Response message for the ListHiveDatabases method. Iterating over this object will yield results and resolve additional pages automatically. |
list_hive_tables
list_hive_tables(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.ListHiveTablesRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> (
google.cloud.biglake_hive_v1beta.services.hive_metastore_service.pagers.ListHiveTablesAsyncPager
)List all hive tables in a specified project under the hive catalog and database.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_list_hive_tables():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
request = biglake_hive_v1beta.ListHiveTablesRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_hive_tables(request=request)
# Handle the response
async for response in page_result:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.ListHiveTablesRequest, dict]]
The request object. Request message for the ListHiveTables method. |
parent |
Required. The database to list tables from. Format: projects/{project_id_or_number}/catalogs/{catalog_id}/databases/{database_id} This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.biglake_hive_v1beta.services.hive_metastore_service.pagers.ListHiveTablesAsyncPager |
Response message for the ListHiveTables method. Iterating over this object will yield results and resolve additional pages automatically. |
list_partitions
list_partitions(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.ListPartitionsRequest,
dict,
]
] = None,
*,
parent: typing.Optional[str] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> typing.Awaitable[
typing.AsyncIterable[
google.cloud.biglake_hive_v1beta.types.hive_metastore.ListPartitionsResponse
]
]Streams list of partitions from a table.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_list_partitions():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
request = biglake_hive_v1beta.ListPartitionsRequest(
parent="parent_value",
)
# Make the request
stream = await client.list_partitions(request=request)
# Handle the response
async for response in stream:
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.ListPartitionsRequest, dict]]
The request object. Request message for ListPartitions. |
parent |
Required. Reference to the table to which these partitions belong, in the format of projects/{project}/catalogs/{catalogs}/databases/{database}/tables/{table}. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
AsyncIterable[google.cloud.biglake_hive_v1beta.types.ListPartitionsResponse] |
Response message for ListPartitions. |
namespace_path
namespace_path(project: str, catalog: str, database: str) -> strReturns a fully-qualified namespace string.
parse_catalog_path
parse_catalog_path(path: str) -> typing.Dict[str, str]Parses a catalog path into its component segments.
parse_common_billing_account_path
parse_common_billing_account_path(path: str) -> typing.Dict[str, str]Parse a billing_account path into its component segments.
parse_common_folder_path
parse_common_folder_path(path: str) -> typing.Dict[str, str]Parse a folder path into its component segments.
parse_common_location_path
parse_common_location_path(path: str) -> typing.Dict[str, str]Parse a location path into its component segments.
parse_common_organization_path
parse_common_organization_path(path: str) -> typing.Dict[str, str]Parse a organization path into its component segments.
parse_common_project_path
parse_common_project_path(path: str) -> typing.Dict[str, str]Parse a project path into its component segments.
parse_namespace_path
parse_namespace_path(path: str) -> typing.Dict[str, str]Parses a namespace path into its component segments.
parse_table_path
parse_table_path(path: str) -> typing.Dict[str, str]Parses a table path into its component segments.
table_path
table_path(project: str, catalog: str, database: str, table: str) -> strReturns a fully-qualified table string.
update_hive_catalog
update_hive_catalog(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.UpdateHiveCatalogRequest,
dict,
]
] = None,
*,
hive_catalog: typing.Optional[
google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveCatalog
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveCatalogUpdates an existing catalog.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_update_hive_catalog():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
hive_catalog = biglake_hive_v1beta.HiveCatalog()
hive_catalog.location_uri = "location_uri_value"
request = biglake_hive_v1beta.UpdateHiveCatalogRequest(
hive_catalog=hive_catalog,
)
# Make the request
response = await client.update_hive_catalog(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.UpdateHiveCatalogRequest, dict]]
The request object. Request message for the UpdateHiveCatalog method. |
hive_catalog |
HiveCatalog
Required. The hive catalog to update. The name under the catalog is used to identify the catalog. Format: projects/{project_id_or_number}/catalogs/{catalog_id} This corresponds to the |
update_mask |
Optional. The list of fields to update. For the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.biglake_hive_v1beta.types.HiveCatalog |
The HiveCatalog contains spark/hive databases and tables in the BigLake Metastore. While creating resources under a catalog, ideally ensure that the storage bucket location, spark / hive engine location or any other compute location match. Catalog can be viewed as the destination for migrating an on-prem Hive metastore to GCP. |
update_hive_database
update_hive_database(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.UpdateHiveDatabaseRequest,
dict,
]
] = None,
*,
hive_database: typing.Optional[
google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveDatabase
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveDatabaseUpdates an existing database specified by the database name.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_update_hive_database():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
request = biglake_hive_v1beta.UpdateHiveDatabaseRequest(
)
# Make the request
response = await client.update_hive_database(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.UpdateHiveDatabaseRequest, dict]]
The request object. Request message for the UpdateHiveDatabase method. |
hive_database |
HiveDatabase
Required. The database to update. The database's |
update_mask |
Optional. The list of fields to update. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.biglake_hive_v1beta.types.HiveDatabase |
Stores the hive database information. It includes the database name, description, location and properties associated with the database. |
update_hive_table
update_hive_table(
request: typing.Optional[
typing.Union[
google.cloud.biglake_hive_v1beta.types.hive_metastore.UpdateHiveTableRequest,
dict,
]
] = None,
*,
hive_table: typing.Optional[
google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveTable
] = None,
update_mask: typing.Optional[google.protobuf.field_mask_pb2.FieldMask] = None,
retry: typing.Optional[
typing.Union[
google.api_core.retry.retry_unary_async.AsyncRetry,
google.api_core.gapic_v1.method._MethodDefault,
]
] = _MethodDefault._DEFAULT_VALUE,
timeout: typing.Union[float, object] = _MethodDefault._DEFAULT_VALUE,
metadata: typing.Sequence[typing.Tuple[str, typing.Union[str, bytes]]] = ()
) -> google.cloud.biglake_hive_v1beta.types.hive_metastore.HiveTableUpdates an existing table specified by the table name.
# This snippet has been automatically generated and should be regarded as a
# code template only.
# It will require modifications to work:
# - It may require correct/in-range values for request initialization.
# - It may require specifying regional endpoints when creating the service
# client as shown in:
# https://googleapis.dev/python/google-api-core/latest/client_options.html
from google.cloud import biglake_hive_v1beta
async def sample_update_hive_table():
# Create a client
client = biglake_hive_v1beta.HiveMetastoreServiceAsyncClient()
# Initialize request argument(s)
hive_table = biglake_hive_v1beta.HiveTable()
hive_table.storage_descriptor.columns.name = "name_value"
hive_table.storage_descriptor.columns.type_ = "type__value"
request = biglake_hive_v1beta.UpdateHiveTableRequest(
hive_table=hive_table,
)
# Make the request
response = await client.update_hive_table(request=request)
# Handle the response
print(response)
| Parameters | |
|---|---|
| Name | Description |
request |
Optional[Union[google.cloud.biglake_hive_v1beta.types.UpdateHiveTableRequest, dict]]
The request object. Request message for the UpdateHiveTable method. |
hive_table |
HiveTable
Required. The table to update. The table's |
update_mask |
Optional. The list of fields to update. This corresponds to the |
retry |
google.api_core.retry_async.AsyncRetry
Designation of what errors, if any, should be retried. |
timeout |
float
The timeout for this request. |
metadata |
Sequence[Tuple[str, Union[str, bytes]]]
Key/value pairs which should be sent along with the request as metadata. Normally, each value must be of type |
| Returns | |
|---|---|
| Type | Description |
google.cloud.biglake_hive_v1beta.types.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 |