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() -> StringThe 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}
- (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.
-
new_connection (String, nil) — The new connection. Passing
nilwill clear the connection, indicating that no authentication information is configured for the remote service.
#endpoint
def endpoint() -> StringThe endpoint of the user-provided remote service, e.g.
https://us-east1-my_gcf_project.cloudfunctions.net/remote_add.
- (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.
-
new_endpoint (String, nil) — The new endpoint. Passing
nilwill clear the endpoint, indicating that no remote service is configured.
#initialize
def initialize() -> RemoteFunctionOptionsCreates a new RemoteFunctionOptions object.
- (RemoteFunctionOptions) — a new instance of RemoteFunctionOptions
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() -> IntegerMax 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.
-
(Integer) — Max number of rows in each batch. Returns
0if 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.
-
new_max_batching_rows (Integer, nil) — The new max batching rows.
Passing
nilor0will reset the batch size, indicating that BigQuery should dynamically decide the number of rows in each batch.
#user_defined_context
def user_defined_context() -> HashUser-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.
- (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.
-
new_user_defined_context (Hash, nil) — The new user-defined
context. Passing
nilwill clear the context, meaning no user-defined key-value pairs will be sent.