Class Google::Cloud::Dataplex::V1::MetadataService::Client (v0.1.0)

Client for the MetadataService service.

Metadata service manages metadata resources such as tables, filesets and partitions.

Inherits

  • Object

Methods

.configure

def self.configure() { |config| ... } -> Client::Configuration

Configure the MetadataService Client class.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter
Example
# Modify the configuration for all MetadataService clients
::Google::Cloud::Dataplex::V1::MetadataService::Client.configure do |config|
  config.timeout = 10.0
end

#configure

def configure() { |config| ... } -> Client::Configuration

Configure the MetadataService Client instance.

The configuration is set to the derived mode, meaning that values can be changed, but structural changes (adding new fields, etc.) are not allowed. Structural changes should be made on Client.configure.

See Configuration for a description of the configuration fields.

Yields
  • (config) — Configure the Client client.
Yield Parameter

#get_entity

def get_entity(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Entity
def get_entity(name: nil, view: nil) -> ::Google::Cloud::Dataplex::V1::Entity

Get a metadata entity.

Overloads
def get_entity(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Entity
Pass arguments to get_entity via a request object, either of type GetEntityRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataplex::V1::GetEntityRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_entity(name: nil, view: nil) -> ::Google::Cloud::Dataplex::V1::Entity
Pass arguments to get_entity via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • name (::String) — Required. The resource name of the entity: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.
  • view (::Google::Cloud::Dataplex::V1::GetEntityRequest::EntityView) — Optional. Used to select the subset of entity information to return. Defaults to BASIC.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::MetadataService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::GetEntityRequest.new

# Call the get_entity method.
result = client.get_entity request

# The returned object is of type Google::Cloud::Dataplex::V1::Entity.
p result

#get_partition

def get_partition(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Partition
def get_partition(name: nil) -> ::Google::Cloud::Dataplex::V1::Partition

Get a metadata partition of an entity.

Overloads
def get_partition(request, options = nil) -> ::Google::Cloud::Dataplex::V1::Partition
Pass arguments to get_partition via a request object, either of type GetPartitionRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataplex::V1::GetPartitionRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def get_partition(name: nil) -> ::Google::Cloud::Dataplex::V1::Partition
Pass arguments to get_partition via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameter
  • name (::String) — Required. The resource name of the partition: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}/partitions/{partition_id}.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::MetadataService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::GetPartitionRequest.new

# Call the get_partition method.
result = client.get_partition request

# The returned object is of type Google::Cloud::Dataplex::V1::Partition.
p result

#initialize

def initialize() { |config| ... } -> Client

Create a new MetadataService client object.

Yields
  • (config) — Configure the MetadataService client.
Yield Parameter
Returns
  • (Client) — a new instance of Client
Example
# Create a client using the default configuration
client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new

# Create a client using a custom configuration
client = ::Google::Cloud::Dataplex::V1::MetadataService::Client.new do |config|
  config.timeout = 10.0
end

#list_entities

def list_entities(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>
def list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>

List metadata entities in a zone.

Overloads
def list_entities(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>
Pass arguments to list_entities via a request object, either of type ListEntitiesRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataplex::V1::ListEntitiesRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_entities(parent: nil, view: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Entity>
Pass arguments to list_entities via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the parent zone: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}.
  • view (::Google::Cloud::Dataplex::V1::ListEntitiesRequest::EntityView) — Required. Specify the entity view to make a partial list request.
  • page_size (::Integer) — Optional. Maximum number of entities to return. The service may return fewer than this value. If unspecified, at most 10 entities will be returned. The maximum value is 1000; values above 1000 are set to 1000.
  • page_token (::String) — Optional. Page token received from a previous ListEntities call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListEntities must match the call that provided the page token.
  • filter (::String) — Optional. Filter request by name prefix.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::MetadataService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListEntitiesRequest.new

# Call the list_entities method.
result = client.list_entities request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::Dataplex::V1::Entity.
  p response
end

#list_partitions

def list_partitions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>
def list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>

List metadata partitions of an entity.

Overloads
def list_partitions(request, options = nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>
Pass arguments to list_partitions via a request object, either of type ListPartitionsRequest or an equivalent Hash.
Parameters
  • request (::Google::Cloud::Dataplex::V1::ListPartitionsRequest, ::Hash) — A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.
  • options (::Gapic::CallOptions, ::Hash) — Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
def list_partitions(parent: nil, page_size: nil, page_token: nil, filter: nil) -> ::Gapic::PagedEnumerable<::Google::Cloud::Dataplex::V1::Partition>
Pass arguments to list_partitions via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above).
Parameters
  • parent (::String) — Required. The resource name of the parent entity: projects/{project_number}/locations/{location_id}/lakes/{lake_id}/zones/{zone_id}/entities/{entity_id}.
  • page_size (::Integer) — Optional. Maximum number of partitions to return. The service may return fewer than this value. If unspecified, at most 10 partitions will be returned. The maximum value is 1000; values above 1000 will be coerced to 1000.
  • page_token (::String) — Optional. Page token received from a previous ListPartitions call. Provide this to retrieve the subsequent page. When paginating, all other parameters provided to ListPartitions must match the call that provided the page token.
  • filter (::String) — Optional. Filter request.
Yields
  • (response, operation) — Access the result along with the RPC operation
Yield Parameters
Returns
Raises
  • (::Google::Cloud::Error) — if the RPC is aborted.
Example

Basic example

require "google/cloud/dataplex/v1"

# Create a client object. The client can be reused for multiple calls.
client = Google::Cloud::Dataplex::V1::MetadataService::Client.new

# Create a request. To set request fields, pass in keyword arguments.
request = Google::Cloud::Dataplex::V1::ListPartitionsRequest.new

# Call the list_partitions method.
result = client.list_partitions request

# The returned object is of type Gapic::PagedEnumerable. You can
# iterate over all elements by calling #each, and the enumerable
# will lazily make API calls to fetch subsequent pages. Other
# methods are also available for managing paging directly.
result.each do |response|
  # Each element is of type ::Google::Cloud::Dataplex::V1::Partition.
  p response
end