Class MaterializedViewDefinition.Builder (2.42.1)

public abstract static class MaterializedViewDefinition.Builder extends TableDefinition.Builder<MaterializedViewDefinition,MaterializedViewDefinition.Builder>

Inheritance

java.lang.Object > TableDefinition.Builder > MaterializedViewDefinition.Builder

Constructors

Builder()

public Builder()

Methods

build()

public abstract MaterializedViewDefinition build()

Creates a MaterializedViewDefinition object.

Returns
Type Description
MaterializedViewDefinition
Overrides

setClustering(Clustering clustering)

public abstract MaterializedViewDefinition.Builder setClustering(Clustering clustering)

Set the clustering configuration for the materialized view. If not set, the materialized view is not clustered. BigQuery supports clustering for both partitioned and non-partitioned materialized views.

Parameter
Name Description
clustering Clustering
Returns
Type Description
MaterializedViewDefinition.Builder

setEnableRefresh(Boolean enableRefresh)

public abstract MaterializedViewDefinition.Builder setEnableRefresh(Boolean enableRefresh)

Set enable automatic refresh of the materialized view when the base table is updated. The default value is "true".

Parameter
Name Description
enableRefresh Boolean
Returns
Type Description
MaterializedViewDefinition.Builder

setQuery(String query)

public abstract MaterializedViewDefinition.Builder setQuery(String query)

Sets the query whose result is persisted.

Parameter
Name Description
query String
Returns
Type Description
MaterializedViewDefinition.Builder

setRangePartitioning(RangePartitioning rangePartitioning)

public abstract MaterializedViewDefinition.Builder setRangePartitioning(RangePartitioning rangePartitioning)

Sets the range partitioning configuration for the materialized view. Only one of timePartitioning and rangePartitioning should be specified.

Parameter
Name Description
rangePartitioning RangePartitioning
Returns
Type Description
MaterializedViewDefinition.Builder

setRefreshIntervalMs(Long refreshIntervalMs)

public abstract MaterializedViewDefinition.Builder setRefreshIntervalMs(Long refreshIntervalMs)

Set a maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes).

Parameter
Name Description
refreshIntervalMs Long
Returns
Type Description
MaterializedViewDefinition.Builder

setSchema(Schema schema)

public abstract MaterializedViewDefinition.Builder setSchema(Schema schema)

Sets the table schema.

Parameter
Name Description
schema Schema
Returns
Type Description
MaterializedViewDefinition.Builder
Overrides

setTimePartitioning(TimePartitioning timePartitioning)

public abstract MaterializedViewDefinition.Builder setTimePartitioning(TimePartitioning timePartitioning)

Sets the time partitioning configuration for the materialized view. If not set, the materialized view is not time-partitioned.

Parameter
Name Description
timePartitioning TimePartitioning
Returns
Type Description
MaterializedViewDefinition.Builder

setType(TableDefinition.Type type)

public abstract MaterializedViewDefinition.Builder setType(TableDefinition.Type type)
Parameter
Name Description
type TableDefinition.Type
Returns
Type Description
MaterializedViewDefinition.Builder
Overrides