Class: Google::Apis::BigqueryV2::PythonOptions

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/bigquery_v2/classes.rb,
lib/google/apis/bigquery_v2/representations.rb,
lib/google/apis/bigquery_v2/representations.rb

Overview

Options for a user-defined Python function.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PythonOptions

Returns a new instance of PythonOptions.



8212
8213
8214
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8212

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#entry_pointString

Required. The name of the function defined in Python code as the entry point when the Python UDF is invoked. Corresponds to the JSON property entryPoint

Returns:

  • (String)


8202
8203
8204
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8202

def entry_point
  @entry_point
end

#packagesArray<String>

Optional. A list of Python package names along with versions to be installed. Example: ["pandas>=2.1", "google-cloud-translate==3.11"]. For more information, see Use third-party packages. Corresponds to the JSON property packages

Returns:

  • (Array<String>)


8210
8211
8212
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8210

def packages
  @packages
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8217
8218
8219
8220
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8217

def update!(**args)
  @entry_point = args[:entry_point] if args.key?(:entry_point)
  @packages = args[:packages] if args.key?(:packages)
end