Package com.google.cloud.bigquery
Class MaterializedViewDefinition.Builder
java.lang.Object
com.google.cloud.bigquery.TableDefinition.Builder<MaterializedViewDefinition,MaterializedViewDefinition.Builder>
com.google.cloud.bigquery.MaterializedViewDefinition.Builder
- Enclosing class:
- MaterializedViewDefinition
public abstract static class MaterializedViewDefinition.Builder
extends TableDefinition.Builder<MaterializedViewDefinition,MaterializedViewDefinition.Builder>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract MaterializedViewDefinitionbuild()Creates aMaterializedViewDefinitionobject.abstract MaterializedViewDefinition.BuildersetClustering(Clustering clustering) Set the clustering configuration for the materialized view.abstract MaterializedViewDefinition.BuildersetEnableRefresh(Boolean enableRefresh) Set enable automatic refresh of the materialized view when the base table is updated.abstract MaterializedViewDefinition.BuilderSets the query whose result is persisted.abstract MaterializedViewDefinition.BuildersetRangePartitioning(RangePartitioning rangePartitioning) Sets the range partitioning configuration for the materialized view.abstract MaterializedViewDefinition.BuildersetRefreshIntervalMs(Long refreshIntervalMs) Set a maximum frequency at which this materialized view will be refreshed.abstract MaterializedViewDefinition.BuilderSets the table schema.abstract MaterializedViewDefinition.BuildersetTimePartitioning(TimePartitioning timePartitioning) Sets the time partitioning configuration for the materialized view.abstract MaterializedViewDefinition.BuildersetType(TableDefinition.Type type)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setQuery
Sets the query whose result is persisted. -
setEnableRefresh
Set enable automatic refresh of the materialized view when the base table is updated. The default value is "true". -
setRefreshIntervalMs
Set a maximum frequency at which this materialized view will be refreshed. The default value is "1800000" (30 minutes). -
setSchema
Sets the table schema.- Specified by:
setSchemain classTableDefinition.Builder<MaterializedViewDefinition,MaterializedViewDefinition.Builder>
-
setType
- Specified by:
setTypein classTableDefinition.Builder<MaterializedViewDefinition,MaterializedViewDefinition.Builder>
-
setTimePartitioning
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. -
setRangePartitioning
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. -
setClustering
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. -
build
Creates aMaterializedViewDefinitionobject.- Specified by:
buildin classTableDefinition.Builder<MaterializedViewDefinition,MaterializedViewDefinition.Builder>
-