Class: Google::Apis::BigqueryV2::TimePartitioning

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

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

Returns a new instance of TimePartitioning



3141
3142
3143
# File 'generated/google/apis/bigquery_v2/classes.rb', line 3141

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

Instance Attribute Details

#expiration_msFixnum

[Optional] Number of milliseconds for which to keep the storage for a partition. Corresponds to the JSON property expirationMs

Returns:

  • (Fixnum)


3125
3126
3127
# File 'generated/google/apis/bigquery_v2/classes.rb', line 3125

def expiration_ms
  @expiration_ms
end

#fieldString

[Experimental] [Optional] If not set, the table is partitioned by pseudo column '_PARTITIONTIME'; if set, the table is partitioned by this field. The field must be a top-level TIMESTAMP or DATE field. Its mode must be NULLABLE or REQUIRED. Corresponds to the JSON property field

Returns:

  • (String)


3133
3134
3135
# File 'generated/google/apis/bigquery_v2/classes.rb', line 3133

def field
  @field
end

#typeString

[Required] The only type supported is DAY, which will generate one partition per day. Corresponds to the JSON property type

Returns:

  • (String)


3139
3140
3141
# File 'generated/google/apis/bigquery_v2/classes.rb', line 3139

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3146
3147
3148
3149
3150
# File 'generated/google/apis/bigquery_v2/classes.rb', line 3146

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