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 Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract 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.BuildersetQuery(String query)Sets 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.BuildersetSchema(Schema schema)Sets the table schema.abstract MaterializedViewDefinition.BuildersetTimePartitioning(TimePartitioning timePartitioning)Sets the time partitioning configuration for the materialized view.abstract MaterializedViewDefinition.BuildersetType(TableDefinition.Type type)
-
-
-
Method Detail
-
setQuery
public abstract MaterializedViewDefinition.Builder setQuery(String query)
Sets the query whose result is persisted.
-
setEnableRefresh
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".
-
setRefreshIntervalMs
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).
-
setSchema
public abstract MaterializedViewDefinition.Builder setSchema(Schema schema)
Sets the table schema.- Specified by:
setSchemain classTableDefinition.Builder<MaterializedViewDefinition,MaterializedViewDefinition.Builder>
-
setType
public abstract MaterializedViewDefinition.Builder setType(TableDefinition.Type type)
- 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
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.
-
build
public abstract MaterializedViewDefinition build()
Creates aMaterializedViewDefinitionobject.- Specified by:
buildin classTableDefinition.Builder<MaterializedViewDefinition,MaterializedViewDefinition.Builder>
-
-