Class: Google::Apis::BigqueryV2::TimePartitioning
- Inherits:
-
Object
- Object
- Google::Apis::BigqueryV2::TimePartitioning
- 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
-
#expiration_ms ⇒ Fixnum
Optional.
-
#field ⇒ String
Optional.
-
#require_partition_filter ⇒ Boolean
(also: #require_partition_filter?)
If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified.
-
#type ⇒ String
Required.
Instance Method Summary collapse
-
#initialize(**args) ⇒ TimePartitioning
constructor
A new instance of TimePartitioning.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ TimePartitioning
Returns a new instance of TimePartitioning.
10526 10527 10528 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 10526 def initialize(**args) update!(**args) end |
Instance Attribute Details
#expiration_ms ⇒ Fixnum
Optional. Number of milliseconds for which to keep the storage for a partition.
A wrapper is used here because 0 is an invalid value.
Corresponds to the JSON property expirationMs
10500 10501 10502 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 10500 def expiration_ms @expiration_ms end |
#field ⇒ String
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. A wrapper is used here because an empty string is an invalid value.
Corresponds to the JSON property field
10508 10509 10510 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 10508 def field @field end |
#require_partition_filter ⇒ Boolean Also known as: require_partition_filter?
If set to true, queries over this table require a partition filter that can be
used for partition elimination to be specified. This field is deprecated;
please set the field with the same name on the table itself instead. This
field needs a wrapper because we want to output the default value, false, if
the user explicitly set it.
Corresponds to the JSON property requirePartitionFilter
10517 10518 10519 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 10517 def require_partition_filter @require_partition_filter end |
#type ⇒ String
Required. The supported types are DAY, HOUR, MONTH, and YEAR, which will
generate one partition per day, hour, month, and year, respectively.
Corresponds to the JSON property type
10524 10525 10526 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 10524 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
10531 10532 10533 10534 10535 10536 |
# File 'lib/google/apis/bigquery_v2/classes.rb', line 10531 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 |