Class MaterializedViewDefinition.Builder (2.26.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
TypeDescription
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
NameDescription
clusteringClustering
Returns
TypeDescription
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
NameDescription
enableRefreshBoolean
Returns
TypeDescription
MaterializedViewDefinition.Builder

setQuery(String query)

public abstract MaterializedViewDefinition.Builder setQuery(String query)

Sets the query whose result is persisted.

Parameter
NameDescription
queryString
Returns
TypeDescription
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
NameDescription
rangePartitioningRangePartitioning
Returns
TypeDescription
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
NameDescription
refreshIntervalMsLong
Returns
TypeDescription
MaterializedViewDefinition.Builder

setSchema(Schema schema)

public abstract MaterializedViewDefinition.Builder setSchema(Schema schema)

Sets the table schema.

Parameter
NameDescription
schemaSchema
Returns
TypeDescription
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
NameDescription
timePartitioningTimePartitioning
Returns
TypeDescription
MaterializedViewDefinition.Builder

setType(TableDefinition.Type type)

public abstract MaterializedViewDefinition.Builder setType(TableDefinition.Type type)
Parameter
NameDescription
typeTableDefinition.Type
Returns
TypeDescription
MaterializedViewDefinition.Builder
Overrides