BigQuery API - Class Google::Cloud::Bigquery::RemoteFunctionOptions (v1.58.0)

Reference documentation and code samples for the BigQuery API class Google::Cloud::Bigquery::RemoteFunctionOptions.

RemoteFunctionOptions

Options for a remote user-defined function.

Inherits

  • Object

Methods

#connection

def connection() -> String

The fully qualified name of the user-provided connection object which holds the authentication information to send requests to the remote service.

Format: projects/{projectId}/locations/{locationId}/connections/{connectionId}

Returns
  • (String) — The fully qualified name of the user-provided connection object. Returns an empty string if the connection is not configured.

#connection=

def connection=(new_connection)

Sets the fully qualified name of the user-provided connection object.

Parameter
  • new_connection (String, nil) — The new connection. Passing nil will clear the connection, indicating that no authentication information is configured for the remote service.

#endpoint

def endpoint() -> String

The endpoint of the user-provided remote service, e.g. https://us-east1-my_gcf_project.cloudfunctions.net/remote_add.

Returns
  • (String) — The endpoint of the user-provided remote service. Returns an empty string if the endpoint is not configured.

#endpoint=

def endpoint=(new_endpoint)

Sets the endpoint of the user-provided remote service.

Parameter
  • new_endpoint (String, nil) — The new endpoint. Passing nil will clear the endpoint, indicating that no remote service is configured.

#initialize

def initialize() -> RemoteFunctionOptions

Creates a new RemoteFunctionOptions object.

Returns
Example
require "google/cloud/bigquery"

remote_function_options = Google::Cloud::Bigquery::RemoteFunctionOptions.new.tap do |rfo|
  rfo.endpoint = "https://us-east1-my_gcf_project.cloudfunctions.net/remote_add"
  rfo.connection = "projects/my-project/locations/us-east1/connections/my-connection"
  rfo.user_defined_context = { "foo" => "bar" }
end

#max_batching_rows

def max_batching_rows() -> Integer

Max number of rows in each batch sent to the remote service. If absent or if 0, BigQuery dynamically decides the number of rows in a batch.

Returns
  • (Integer) — Max number of rows in each batch. Returns 0 if not set, which indicates that BigQuery dynamically decides the number of rows.

#max_batching_rows=

def max_batching_rows=(new_max_batching_rows)

Sets the max number of rows in each batch sent to the remote service.

Parameter
  • new_max_batching_rows (Integer, nil) — The new max batching rows. Passing nil or 0 will reset the batch size, indicating that BigQuery should dynamically decide the number of rows in each batch.

#user_defined_context

def user_defined_context() -> Hash

User-defined context as a set of key/value pairs, which will be sent as function invocation context together with batched arguments in the requests to the remote service. The total number of bytes of keys and values must be less than 8KB.

Returns
  • (Hash) — The user-defined context. Returns an empty hash if no context is configured.

#user_defined_context=

def user_defined_context=(new_user_defined_context)

Sets the user-defined context.

Parameter
  • new_user_defined_context (Hash, nil) — The new user-defined context. Passing nil will clear the context, meaning no user-defined key-value pairs will be sent.