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.



8124
8125
8126
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8124

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)


8114
8115
8116
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8114

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>)


8122
8123
8124
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8122

def packages
  @packages
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8129
8130
8131
8132
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8129

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