Class: Google::Apis::BigqueryV2::StandardSqlField

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

Overview

A field or a column.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ StandardSqlField

Returns a new instance of StandardSqlField.


5518
5519
5520
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5518

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

Instance Attribute Details

#nameString

Optional. The name of this field. Can be absent for struct fields. Corresponds to the JSON property name

Returns:

  • (String)

5508
5509
5510
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5508

def name
  @name
end

#typeGoogle::Apis::BigqueryV2::StandardSqlDataType

The type of a variable, e.g., a function argument. Examples: INT64: type_kind= "INT64" ARRAY: type_kind="ARRAY", array_element_type="STRING" STRUCT>: type_kind="STRUCT", struct_type=fields=[ name="x", type=type_kind="STRING" , `name="y", type=`type_kind="ARRAY", array_element_type="DATE" ]` Corresponds to the JSON propertytype`


5516
5517
5518
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5516

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


5523
5524
5525
5526
# File 'generated/google/apis/bigquery_v2/classes.rb', line 5523

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