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

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ TimePartitioning

Returns a new instance of TimePartitioning.



8226
8227
8228
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8226

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

Instance Attribute Details

#expiration_msFixnum

[Optional] Number of milliseconds for which to keep the storage for partitions in the table. The storage in a partition will have an expiration time of its partition time plus this value. Corresponds to the JSON property expirationMs

Returns:

  • (Fixnum)


8202
8203
8204
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8202

def expiration_ms
  @expiration_ms
end

#fieldString

[Beta] [Optional] If not set, the table is partitioned by pseudo column, referenced via either '_PARTITIONTIME' as TIMESTAMP type, or '_PARTITIONDATE' as DATE type. If field is specified, the table is instead 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)


8211
8212
8213
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8211

def field
  @field
end

#require_partition_filterBoolean Also known as: require_partition_filter?

Corresponds to the JSON property requirePartitionFilter

Returns:

  • (Boolean)


8216
8217
8218
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8216

def require_partition_filter
  @require_partition_filter
end

#typeString

[Required] The supported types are DAY, HOUR, MONTH, and YEAR, which will generate one partition per day, hour, month, and year, respectively. When the type is not specified, the default behavior is DAY. Corresponds to the JSON property type

Returns:

  • (String)


8224
8225
8226
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8224

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8231
8232
8233
8234
8235
8236
# File 'lib/google/apis/bigquery_v2/classes.rb', line 8231

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