Class: Google::Apis::BigqueryV2::MaterializedViewDefinition

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

Returns a new instance of MaterializedViewDefinition.


4073
4074
4075
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4073

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

Instance Attribute Details

#enable_refreshBoolean Also known as: enable_refresh?

[Optional] [TrustedTester] Enable automatic refresh of the materialized view when the base table is updated. The default value is "true". Corresponds to the JSON property enableRefresh

Returns:

  • (Boolean)

4053
4054
4055
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4053

def enable_refresh
  @enable_refresh
end

#last_refresh_timeFixnum

[Output-only] [TrustedTester] The time when this materialized view was last modified, in milliseconds since the epoch. Corresponds to the JSON property lastRefreshTime

Returns:

  • (Fixnum)

4060
4061
4062
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4060

def last_refresh_time
  @last_refresh_time
end

#queryString

[Required] A query whose result is persisted. Corresponds to the JSON property query

Returns:

  • (String)

4065
4066
4067
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4065

def query
  @query
end

#refresh_interval_msFixnum

[Optional] [TrustedTester] The maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes). Corresponds to the JSON property refreshIntervalMs

Returns:

  • (Fixnum)

4071
4072
4073
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4071

def refresh_interval_ms
  @refresh_interval_ms
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


4078
4079
4080
4081
4082
4083
# File 'generated/google/apis/bigquery_v2/classes.rb', line 4078

def update!(**args)
  @enable_refresh = args[:enable_refresh] if args.key?(:enable_refresh)
  @last_refresh_time = args[:last_refresh_time] if args.key?(:last_refresh_time)
  @query = args[:query] if args.key?(:query)
  @refresh_interval_ms = args[:refresh_interval_ms] if args.key?(:refresh_interval_ms)
end