Class: Google::Apis::BigqueryV2::Routine
- Inherits:
-
Object
- Object
- Google::Apis::BigqueryV2::Routine
- 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
A user-defined function or a stored procedure.
Instance Attribute Summary collapse
-
#arguments ⇒ Array<Google::Apis::BigqueryV2::Argument>
Optional.
-
#build_status ⇒ Google::Apis::BigqueryV2::RoutineBuildStatus
The status of a routine build.
-
#creation_time ⇒ Fixnum
Output only.
-
#data_governance_type ⇒ String
Optional.
-
#definition_body ⇒ String
Required.
-
#description ⇒ String
Optional.
-
#determinism_level ⇒ String
Optional.
-
#etag ⇒ String
Output only.
-
#external_runtime_options ⇒ Google::Apis::BigqueryV2::ExternalRuntimeOptions
Options for the runtime of the external system.
-
#imported_libraries ⇒ Array<String>
Optional.
-
#language ⇒ String
Optional.
-
#last_modified_time ⇒ Fixnum
Output only.
-
#python_options ⇒ Google::Apis::BigqueryV2::PythonOptions
Options for a user-defined Python function.
-
#remote_function_options ⇒ Google::Apis::BigqueryV2::RemoteFunctionOptions
Options for a remote user-defined function.
-
#return_table_type ⇒ Google::Apis::BigqueryV2::StandardSqlTableType
A table type Corresponds to the JSON property
returnTableType. -
#return_type ⇒ Google::Apis::BigqueryV2::StandardSqlDataType
The data type of a variable such as a function argument.
-
#routine_reference ⇒ Google::Apis::BigqueryV2::RoutineReference
Id path of a routine.
-
#routine_type ⇒ String
Required.
-
#security_mode ⇒ String
Optional.
-
#spark_options ⇒ Google::Apis::BigqueryV2::SparkOptions
Options for a user-defined Spark routine.
-
#strict_mode ⇒ Boolean
(also: #strict_mode?)
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Routine
constructor
A new instance of Routine.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Routine
Returns a new instance of Routine.
9479 9480 9481 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9479 def initialize(**args) update!(**args) end |
Instance Attribute Details
#arguments ⇒ Array<Google::Apis::BigqueryV2::Argument>
Optional.
Corresponds to the JSON property arguments
9344 9345 9346 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9344 def arguments @arguments end |
#build_status ⇒ Google::Apis::BigqueryV2::RoutineBuildStatus
The status of a routine build.
Corresponds to the JSON property buildStatus
9349 9350 9351 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9349 def build_status @build_status end |
#creation_time ⇒ Fixnum
Output only. The time when this routine was created, in milliseconds since the
epoch.
Corresponds to the JSON property creationTime
9355 9356 9357 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9355 def creation_time @creation_time end |
#data_governance_type ⇒ String
Optional. If set to DATA_MASKING, the function is validated and made
available as a masking function. For more information, see Create custom
masking routines.
Corresponds to the JSON property dataGovernanceType
9363 9364 9365 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9363 def data_governance_type @data_governance_type end |
#definition_body ⇒ String
Required. The body of the routine. For functions, this is the expression in
the AS clause. If language = "SQL", it is the substring inside (but
excluding) the parentheses. For example, for the function created with the
following statement: CREATE FUNCTION JoinLines(x string, y string) as (concat(
x, "\n", y)) The definition_body is concat(x, "\n", y) (\n is not replaced
with linebreak). If language="JAVASCRIPT", it is the evaluated string in the
AS clause. For example, for the function created with the following statement:
CREATE FUNCTION f() RETURNS STRING LANGUAGE js AS 'return "\n";\n' The
definition_body is return "\n";\n Note that both \n are replaced with
linebreaks. If definition_body references another routine, then that routine
must be fully qualified with its project ID.
Corresponds to the JSON property definitionBody
9378 9379 9380 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9378 def definition_body @definition_body end |
#description ⇒ String
Optional. The description of the routine, if defined.
Corresponds to the JSON property description
9383 9384 9385 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9383 def description @description end |
#determinism_level ⇒ String
Optional. The determinism level of the JavaScript UDF, if defined.
Corresponds to the JSON property determinismLevel
9388 9389 9390 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9388 def determinism_level @determinism_level end |
#etag ⇒ String
Output only. A hash of this resource.
Corresponds to the JSON property etag
9393 9394 9395 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9393 def etag @etag end |
#external_runtime_options ⇒ Google::Apis::BigqueryV2::ExternalRuntimeOptions
Options for the runtime of the external system.
Corresponds to the JSON property externalRuntimeOptions
9398 9399 9400 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9398 def @external_runtime_options end |
#imported_libraries ⇒ Array<String>
Optional. If language = "JAVASCRIPT", this field stores the path of the
imported JAVASCRIPT libraries.
Corresponds to the JSON property importedLibraries
9404 9405 9406 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9404 def imported_libraries @imported_libraries end |
#language ⇒ String
Optional. Defaults to "SQL" if remote_function_options field is absent, not
set otherwise.
Corresponds to the JSON property language
9410 9411 9412 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9410 def language @language end |
#last_modified_time ⇒ Fixnum
Output only. The time when this routine was last modified, in milliseconds
since the epoch.
Corresponds to the JSON property lastModifiedTime
9416 9417 9418 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9416 def last_modified_time @last_modified_time end |
#python_options ⇒ Google::Apis::BigqueryV2::PythonOptions
Options for a user-defined Python function.
Corresponds to the JSON property pythonOptions
9421 9422 9423 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9421 def @python_options end |
#remote_function_options ⇒ Google::Apis::BigqueryV2::RemoteFunctionOptions
Options for a remote user-defined function.
Corresponds to the JSON property remoteFunctionOptions
9426 9427 9428 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9426 def @remote_function_options end |
#return_table_type ⇒ Google::Apis::BigqueryV2::StandardSqlTableType
A table type
Corresponds to the JSON property returnTableType
9431 9432 9433 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9431 def return_table_type @return_table_type end |
#return_type ⇒ Google::Apis::BigqueryV2::StandardSqlDataType
The data type of a variable such as a function argument. Examples include: *
INT64: "typeKind": "INT64" * ARRAY: "typeKind": "ARRAY", "
arrayElementType":"typeKind": "STRING" * STRUCT>: "typeKind": "STRUCT",
"structType": "fields": [ "name": "x", "type":"typeKind": "STRING",
"name": "y", "type": "typeKind": "ARRAY", "arrayElementType": "typeKind": "
DATE" ] * RANGE: "typeKind": "RANGE", "rangeElementType":"
typeKind": "DATE"
Corresponds to the JSON property returnType
9442 9443 9444 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9442 def return_type @return_type end |
#routine_reference ⇒ Google::Apis::BigqueryV2::RoutineReference
Id path of a routine.
Corresponds to the JSON property routineReference
9447 9448 9449 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9447 def routine_reference @routine_reference end |
#routine_type ⇒ String
Required. The type of routine.
Corresponds to the JSON property routineType
9452 9453 9454 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9452 def routine_type @routine_type end |
#security_mode ⇒ String
Optional. The security mode of the routine, if defined. If not defined, the
security mode is automatically determined from the routine's configuration.
Corresponds to the JSON property securityMode
9458 9459 9460 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9458 def security_mode @security_mode end |
#spark_options ⇒ Google::Apis::BigqueryV2::SparkOptions
Options for a user-defined Spark routine.
Corresponds to the JSON property sparkOptions
9463 9464 9465 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9463 def @spark_options end |
#strict_mode ⇒ Boolean Also known as: strict_mode?
Optional. Use this option to catch many common errors. Error checking is not
exhaustive, and successfully creating a procedure doesn't guarantee that the
procedure will successfully execute at runtime. If strictMode is set to
TRUE, the procedure body is further checked for errors such as non-existent
tables or columns. The CREATE PROCEDURE statement fails if the body fails
any of these checks. If strictMode is set to FALSE, the procedure body is
checked only for syntax. For procedures that invoke themselves recursively,
specify strictMode=FALSE to avoid non-existent procedure errors during
validation. Default value is TRUE.
Corresponds to the JSON property strictMode
9476 9477 9478 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9476 def strict_mode @strict_mode end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
9484 9485 9486 9487 9488 9489 9490 9491 9492 9493 9494 9495 9496 9497 9498 9499 9500 9501 9502 9503 9504 9505 9506 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 9484 def update!(**args) @arguments = args[:arguments] if args.key?(:arguments) @build_status = args[:build_status] if args.key?(:build_status) @creation_time = args[:creation_time] if args.key?(:creation_time) @data_governance_type = args[:data_governance_type] if args.key?(:data_governance_type) @definition_body = args[:definition_body] if args.key?(:definition_body) @description = args[:description] if args.key?(:description) @determinism_level = args[:determinism_level] if args.key?(:determinism_level) @etag = args[:etag] if args.key?(:etag) @external_runtime_options = args[:external_runtime_options] if args.key?(:external_runtime_options) @imported_libraries = args[:imported_libraries] if args.key?(:imported_libraries) @language = args[:language] if args.key?(:language) @last_modified_time = args[:last_modified_time] if args.key?(:last_modified_time) @python_options = args[:python_options] if args.key?(:python_options) @remote_function_options = args[:remote_function_options] if args.key?(:remote_function_options) @return_table_type = args[:return_table_type] if args.key?(:return_table_type) @return_type = args[:return_type] if args.key?(:return_type) @routine_reference = args[:routine_reference] if args.key?(:routine_reference) @routine_type = args[:routine_type] if args.key?(:routine_type) @security_mode = args[:security_mode] if args.key?(:security_mode) @spark_options = args[:spark_options] if args.key?(:spark_options) @strict_mode = args[:strict_mode] if args.key?(:strict_mode) end |