Class MaterializedViewDefinition.Builder (2.53.0)
Note: Some or all of the information on this page might not apply
to Trusted Cloud. For a list of services that are available in
Trusted Cloud, see Services available for
Trusted Cloud .
Version 2.53.0keyboard_arrow_down
public abstract static class MaterializedViewDefinition . Builder extends TableDefinition . Builder<MaterializedViewDefinition , MaterializedViewDefinition . Builder >
Constructors
Builder()
Methods
build()
public abstract MaterializedViewDefinition build ()
Creates a MaterializedViewDefinition
object.
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.
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
setQuery(String query)
public abstract MaterializedViewDefinition . Builder setQuery ( String query )
Sets the query whose result is persisted.
Parameter
Name
Description
query
String
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.
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
setSchema(Schema schema)
public abstract MaterializedViewDefinition . Builder setSchema ( Schema schema )
Parameter
Name
Description
schema
Schema
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.
setType(TableDefinition.Type type)
public abstract MaterializedViewDefinition . Builder setType ( TableDefinition . Type type )
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[]]