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.



7838
7839
7840
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7838

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)


7828
7829
7830
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7828

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


7836
7837
7838
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7836

def packages
  @packages
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7843
7844
7845
7846
# File 'lib/google/apis/bigquery_v2/classes.rb', line 7843

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