Class HiveMetastoreServiceClient (0.1.0)

HiveMetastoreServiceClient(
    *,
    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,
            ],
        ]
    ] = None,
    client_options: typing.Optional[
        typing.Union[google.api_core.client_options.ClientOptions, dict]
    ] = 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

HiveMetastoreServiceClient

HiveMetastoreServiceClient(
    *,
    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,
            ],
        ]
    ] = None,
    client_options: typing.Optional[
        typing.Union[google.api_core.client_options.ClientOptions, dict]
    ] = None,
    client_info: google.api_core.gapic_v1.client_info.ClientInfo = google.api_core.gapic_v1.client_info.ClientInfo
)

Instantiates the hive metastore service 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. 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 api_endpoint property can be used to override the default endpoint provided by the client when transport is not explicitly provided. Only if this property is not set and transport was not explicitly provided, the endpoint is determined by the GOOGLE_API_USE_MTLS_ENDPOINT environment variable, which have one of the following values: "always" (always use the default mTLS endpoint), "never" (always use the default regular endpoint) and "auto" (auto-switch to the default mTLS endpoint if client certificate is present; this is the default value). 2. If the GOOGLE_API_USE_CLIENT_CERTIFICATE environment variable is "true", then the client_cert_source property can be used to provide a client certificate for mTLS transport. If not provided, the default SSL client certificate will be used if present. If GOOGLE_API_USE_CLIENT_CERTIFICATE is "false" or not set, no client certificate will be used. 3. The universe_domain property can be used to override the default "googleapis.com" universe. Note that the api_endpoint property still takes precedence; and universe_domain is currently not supported for mTLS.

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 None, then default info will be used. Generally, you only need to set this if you're developing your own client library.

Exceptions
Type Description
google.auth.exceptions.MutualTLSChannelError If mutual TLS transport creation failed for any reason.

__exit__

__exit__(type, value, traceback)

Releases underlying transport's resources.

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.Retry,
            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

def sample_batch_create_partitions():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # 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 = client.batch_create_partitions(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.BatchCreatePartitionsRequest, dict]

The request object. Request message for the BatchCreatePartitions method.

parent str

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 parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

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.Retry,
            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]]] = ()
) -> None

Deletes 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

def sample_batch_delete_partitions():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # 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
    client.batch_delete_partitions(request=request)
Parameters
Name Description
request 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 str

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 parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

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.Retry,
            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

def sample_batch_update_partitions():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # 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 = client.batch_update_partitions(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.BatchUpdatePartitionsRequest, dict]

The request object. Request message for BatchUpdatePartitions.

parent str

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 parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.biglake_hive_v1beta.types.BatchUpdatePartitionsResponse Response message for BatchUpdatePartitions.

catalog_path

catalog_path(project: str, catalog: str) -> str

Returns a fully-qualified catalog string.

common_billing_account_path

common_billing_account_path(billing_account: str) -> str

Returns a fully-qualified billing_account string.

common_folder_path

common_folder_path(folder: str) -> str

Returns a fully-qualified folder string.

common_location_path

common_location_path(project: str, location: str) -> str

Returns a fully-qualified location string.

common_organization_path

common_organization_path(organization: str) -> str

Returns a fully-qualified organization string.

common_project_path

common_project_path(project: str) -> str

Returns 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.Retry,
            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.HiveCatalog

Creates 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

def sample_create_hive_catalog():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # 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 = client.create_hive_catalog(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.CreateHiveCatalogRequest, dict]

The request object. Request message for the CreateHiveCatalog method.

parent str

Required. The parent resource where this catalog will be created. Format: projects/{project_id_or_number} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

hive_catalog google.cloud.biglake_hive_v1beta.types.HiveCatalog

Required. The catalog to create. The name field does not need to be provided. Gets copied over from catalog_id. This corresponds to the hive_catalog field on the request instance; if request is provided, this should not be set.

hive_catalog_id str

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 hive_catalog_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

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.Retry,
            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.HiveDatabase

Creates 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

def sample_create_hive_database():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # Initialize request argument(s)
    request = biglake_hive_v1beta.CreateHiveDatabaseRequest(
        parent="parent_value",
        hive_database_id="hive_database_id_value",
    )

    # Make the request
    response = client.create_hive_database(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.CreateHiveDatabaseRequest, dict]

The request object. Request message for the CreateHiveDatabase method.

parent str

Required. The parent resource where this database will be created. Format: projects/{project_id_or_number}/catalogs/{catalog_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

hive_database google.cloud.biglake_hive_v1beta.types.HiveDatabase

Required. The database to create. The name field does not need to be provided. This corresponds to the hive_database field on the request instance; if request is provided, this should not be set.

hive_database_id str

Required. The ID to use for the Hive Database. The maximum length is 128 characters. This corresponds to the hive_database_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

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.Retry,
            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.HiveTable

Creates 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

def sample_create_hive_table():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # 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 = client.create_hive_table(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.CreateHiveTableRequest, dict]

The request object. Request message for the CreateHiveTable method.

parent str

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 parent field on the request instance; if request is provided, this should not be set.

hive_table google.cloud.biglake_hive_v1beta.types.HiveTable

Required. The Hive Table to create. The name field does not need to be provided. This corresponds to the hive_table field on the request instance; if request is provided, this should not be set.

hive_table_id str

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 hive_table_id field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

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.Retry,
            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]]] = ()
) -> None

Deletes 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

def sample_delete_hive_catalog():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # Initialize request argument(s)
    request = biglake_hive_v1beta.DeleteHiveCatalogRequest(
        name="name_value",
    )

    # Make the request
    client.delete_hive_catalog(request=request)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.DeleteHiveCatalogRequest, dict]

The request object. Request message for the DeleteHiveCatalog method.

name str

Required. The name of the catalog to delete. Format: projects/{project_id_or_number}/catalogs/{catalog_id} This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

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.Retry,
            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]]] = ()
) -> None

Deletes 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

def sample_delete_hive_database():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # Initialize request argument(s)
    request = biglake_hive_v1beta.DeleteHiveDatabaseRequest(
        name="name_value",
    )

    # Make the request
    client.delete_hive_database(request=request)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.DeleteHiveDatabaseRequest, dict]

The request object. Request message for the DeleteHiveDatabase method.

name str

Required. The name of the database to delete. Format: projects/{project_id_or_number}/catalogs/{catalog_id}/databases/{database_id} This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

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.Retry,
            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]]] = ()
) -> None

Deletes 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

def sample_delete_hive_table():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # Initialize request argument(s)
    request = biglake_hive_v1beta.DeleteHiveTableRequest(
        name="name_value",
    )

    # Make the request
    client.delete_hive_table(request=request)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.DeleteHiveTableRequest, dict]

The request object. Request message for the DeleteHiveTable method.

name str

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 name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

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
HiveMetastoreServiceClient 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
HiveMetastoreServiceClient 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
HiveMetastoreServiceClient 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.Retry,
            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.HiveCatalog

Gets 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

def sample_get_hive_catalog():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # Initialize request argument(s)
    request = biglake_hive_v1beta.GetHiveCatalogRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_hive_catalog(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.GetHiveCatalogRequest, dict]

The request object. Request message for the GetHiveCatalog method.

name str

Required. The name of the catalog to retrieve. Format: projects/{project_id_or_number}/catalogs/{catalog_id} This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

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.Retry,
            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.HiveDatabase

Gets 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

def sample_get_hive_database():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # Initialize request argument(s)
    request = biglake_hive_v1beta.GetHiveDatabaseRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_hive_database(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.GetHiveDatabaseRequest, dict]

The request object. Request message for the GetHiveDatabase method.

name str

Required. The name of the database to retrieve. Format: projects/{project_id_or_number}/catalogs/{catalog_id}/databases/{database_id} This corresponds to the name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

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.Retry,
            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.HiveTable

Gets 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

def sample_get_hive_table():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # Initialize request argument(s)
    request = biglake_hive_v1beta.GetHiveTableRequest(
        name="name_value",
    )

    # Make the request
    response = client.get_hive_table(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.GetHiveTableRequest, dict]

The request object. Request message for the GetHiveTable method.

name str

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 name field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

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,
)

Deprecated. 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 api_endpoint and client_cert_source properties may be used in this method.

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.

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.Retry,
            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.ListHiveCatalogsPager
)

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

def sample_list_hive_catalogs():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # 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
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.ListHiveCatalogsRequest, dict]

The request object. Request message for the ListHiveCatalogs method.

parent str

Required. The project to list catalogs from. Format: projects/{project_id_or_number} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.biglake_hive_v1beta.services.hive_metastore_service.pagers.ListHiveCatalogsPager 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.Retry,
            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.ListHiveDatabasesPager
)

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

def sample_list_hive_databases():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # 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
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.ListHiveDatabasesRequest, dict]

The request object. Request message for the ListHiveDatabases method.

parent str

Required. The hive catalog to list databases from. Format: projects/{project_id_or_number}/catalogs/{catalog_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.biglake_hive_v1beta.services.hive_metastore_service.pagers.ListHiveDatabasesPager 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.Retry,
            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.ListHiveTablesPager
)

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

def sample_list_hive_tables():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # 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
    for response in page_result:
        print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.ListHiveTablesRequest, dict]

The request object. Request message for the ListHiveTables method.

parent str

Required. The database to list tables from. Format: projects/{project_id_or_number}/catalogs/{catalog_id}/databases/{database_id} This corresponds to the parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
google.cloud.biglake_hive_v1beta.services.hive_metastore_service.pagers.ListHiveTablesPager 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.Retry,
            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.Iterable[
    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

def sample_list_partitions():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # Initialize request argument(s)
    request = biglake_hive_v1beta.ListPartitionsRequest(
        parent="parent_value",
    )

    # Make the request
    stream = client.list_partitions(request=request)

    # Handle the response
    for response in stream:
        print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.ListPartitionsRequest, dict]

The request object. Request message for ListPartitions.

parent str

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 parent field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

Returns
Type Description
Iterable[google.cloud.biglake_hive_v1beta.types.ListPartitionsResponse] Response message for ListPartitions.

namespace_path

namespace_path(project: str, catalog: str, database: str) -> str

Returns 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) -> str

Returns 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.Retry,
            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.HiveCatalog

Updates 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

def sample_update_hive_catalog():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # 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 = client.update_hive_catalog(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.UpdateHiveCatalogRequest, dict]

The request object. Request message for the UpdateHiveCatalog method.

hive_catalog google.cloud.biglake_hive_v1beta.types.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 hive_catalog field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Optional. The list of fields to update. For the FieldMask definition, see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask If not set, defaults to all of the fields that are allowed to update. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

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.Retry,
            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.HiveDatabase

Updates 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

def sample_update_hive_database():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # Initialize request argument(s)
    request = biglake_hive_v1beta.UpdateHiveDatabaseRequest(
    )

    # Make the request
    response = client.update_hive_database(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.UpdateHiveDatabaseRequest, dict]

The request object. Request message for the UpdateHiveDatabase method.

hive_database google.cloud.biglake_hive_v1beta.types.HiveDatabase

Required. The database to update. The database's name field is used to identify the database to update. Format: projects/{project_id_or_number}/catalogs/{catalog_id}/databases/{database_id} This corresponds to the hive_database field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Optional. The list of fields to update. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

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.Retry,
            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.HiveTable

Updates 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

def sample_update_hive_table():
    # Create a client
    client = biglake_hive_v1beta.HiveMetastoreServiceClient()

    # 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 = client.update_hive_table(request=request)

    # Handle the response
    print(response)
Parameters
Name Description
request Union[google.cloud.biglake_hive_v1beta.types.UpdateHiveTableRequest, dict]

The request object. Request message for the UpdateHiveTable method.

hive_table google.cloud.biglake_hive_v1beta.types.HiveTable

Required. The table to update. The table's name field is used to identify the table to update. Format: projects/{project_id_or_number}/catalogs/{catalog_id}/databases/{database_id}/tables/{table_id} This corresponds to the hive_table field on the request instance; if request is provided, this should not be set.

update_mask google.protobuf.field_mask_pb2.FieldMask

Optional. The list of fields to update. This corresponds to the update_mask field on the request instance; if request is provided, this should not be set.

retry google.api_core.retry.Retry

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 str, but for metadata keys ending with the suffix -bin, the corresponding values must be of type bytes.

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