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



3675
3676
3677
# File 'generated/google/apis/bigquery_v2/classes.rb', line 3675

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)


3651
3652
3653
# File 'generated/google/apis/bigquery_v2/classes.rb', line 3651

def expiration_ms
  @expiration_ms
end

#fieldString

[Experimental] [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)


3660
3661
3662
# File 'generated/google/apis/bigquery_v2/classes.rb', line 3660

def field
  @field
end

#require_partition_filterBoolean Also known as: require_partition_filter?

[Experimental] [Optional] If set to true, queries over this table require a partition filter that can be used for partition elimination to be specified. Corresponds to the JSON property requirePartitionFilter

Returns:

  • (Boolean)


3666
3667
3668
# File 'generated/google/apis/bigquery_v2/classes.rb', line 3666

def require_partition_filter
  @require_partition_filter
end

#typeString

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

Returns:

  • (String)


3673
3674
3675
# File 'generated/google/apis/bigquery_v2/classes.rb', line 3673

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3680
3681
3682
3683
3684
3685
# File 'generated/google/apis/bigquery_v2/classes.rb', line 3680

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