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

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

Overview

Definition and configuration of a materialized view.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ MaterializedViewDefinition

Returns a new instance of MaterializedViewDefinition.



6910
6911
6912
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6910

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

Instance Attribute Details

#allow_non_incremental_definitionBoolean Also known as: allow_non_incremental_definition?

Optional. This option declares the intention to construct a materialized view that isn't refreshed incrementally. Non-incremental materialized views support an expanded range of SQL queries. The allow_non_incremental_definition option can't be changed after the materialized view is created. Corresponds to the JSON property allowNonIncrementalDefinition

Returns:

  • (Boolean)


6876
6877
6878
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6876

def allow_non_incremental_definition
  @allow_non_incremental_definition
end

#enable_refreshBoolean Also known as: enable_refresh?

Optional. 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)


6883
6884
6885
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6883

def enable_refresh
  @enable_refresh
end

#last_refresh_timeFixnum

Output only. The time when this materialized view was last refreshed, in milliseconds since the epoch. Corresponds to the JSON property lastRefreshTime

Returns:

  • (Fixnum)


6890
6891
6892
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6890

def last_refresh_time
  @last_refresh_time
end

#max_stalenessString

[Optional] Max staleness of data that could be returned when materizlized view is queried (formatted as Google SQL Interval type). Corresponds to the JSON property maxStaleness NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


6897
6898
6899
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6897

def max_staleness
  @max_staleness
end

#queryString

Required. A query whose results are persisted. Corresponds to the JSON property query

Returns:

  • (String)


6902
6903
6904
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6902

def query
  @query
end

#refresh_interval_msFixnum

Optional. 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)


6908
6909
6910
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6908

def refresh_interval_ms
  @refresh_interval_ms
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



6915
6916
6917
6918
6919
6920
6921
6922
# File 'lib/google/apis/bigquery_v2/classes.rb', line 6915

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