Class: Google::Cloud::Bigquery::RemoteFunctionOptions
- Inherits:
-
Object
- Object
- Google::Cloud::Bigquery::RemoteFunctionOptions
- Defined in:
- lib/google/cloud/bigquery/remote_function_options.rb
Overview
RemoteFunctionOptions
Options for a remote user-defined function.
Instance Method Summary collapse
-
#connection ⇒ String
The fully qualified name of the user-provided connection object which holds the authentication information to send requests to the remote service.
-
#connection=(new_connection) ⇒ Object
Sets the fully qualified name of the user-provided connection object.
-
#endpoint ⇒ String
The endpoint of the user-provided remote service, e.g.
-
#endpoint=(new_endpoint) ⇒ Object
Sets the endpoint of the user-provided remote service.
-
#initialize ⇒ RemoteFunctionOptions
constructor
Creates a new RemoteFunctionOptions object.
-
#max_batching_rows ⇒ Integer
Max number of rows in each batch sent to the remote service.
-
#max_batching_rows=(new_max_batching_rows) ⇒ Object
Sets the max number of rows in each batch sent to the remote service.
-
#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.
-
#user_defined_context=(new_user_defined_context) ⇒ Object
Sets the user-defined context.
Constructor Details
#initialize ⇒ RemoteFunctionOptions
Creates a new RemoteFunctionOptions object.
41 42 43 |
# File 'lib/google/cloud/bigquery/remote_function_options.rb', line 41 def initialize @gapi = Google::Apis::BigqueryV2::RemoteFunctionOptions.new end |
Instance Method Details
#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}
78 79 80 |
# File 'lib/google/cloud/bigquery/remote_function_options.rb', line 78 def connection @gapi.connection || "" end |
#connection=(new_connection) ⇒ Object
Sets the fully qualified name of the user-provided connection object.
89 90 91 |
# File 'lib/google/cloud/bigquery/remote_function_options.rb', line 89 def connection= new_connection @gapi.connection = new_connection end |
#endpoint ⇒ String
The endpoint of the user-provided remote service, e.g.
https://us-east1-my_gcf_project.cloudfunctions.net/remote_add.
52 53 54 |
# File 'lib/google/cloud/bigquery/remote_function_options.rb', line 52 def endpoint @gapi.endpoint || "" end |
#endpoint=(new_endpoint) ⇒ Object
Sets the endpoint of the user-provided remote service.
62 63 64 |
# File 'lib/google/cloud/bigquery/remote_function_options.rb', line 62 def endpoint= new_endpoint @gapi.endpoint = new_endpoint end |
#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.
125 126 127 |
# File 'lib/google/cloud/bigquery/remote_function_options.rb', line 125 def max_batching_rows @gapi.max_batching_rows || 0 end |
#max_batching_rows=(new_max_batching_rows) ⇒ Object
Sets the max number of rows in each batch sent to the remote service.
136 137 138 |
# File 'lib/google/cloud/bigquery/remote_function_options.rb', line 136 def max_batching_rows= new_max_batching_rows @gapi.max_batching_rows = new_max_batching_rows end |
#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.
102 103 104 |
# File 'lib/google/cloud/bigquery/remote_function_options.rb', line 102 def user_defined_context @gapi.user_defined_context || {} end |
#user_defined_context=(new_user_defined_context) ⇒ Object
Sets the user-defined context.
113 114 115 |
# File 'lib/google/cloud/bigquery/remote_function_options.rb', line 113 def user_defined_context= new_user_defined_context @gapi.user_defined_context = new_user_defined_context end |