Package com.google.cloud.bigquery
Class Table.Builder
- java.lang.Object
-
- com.google.cloud.bigquery.TableInfo.Builder
-
- com.google.cloud.bigquery.Table.Builder
-
- Enclosing class:
- Table
public static class Table.Builder extends TableInfo.Builder
A builder forTableobjects.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Tablebuild()Creates aTableInfoobject.TableInfo.BuildersetCloneDefinition(CloneDefinition cloneDefinition)Table.BuildersetDefaultCollation(String defaultCollation)Table.BuildersetDefinition(TableDefinition definition)Sets the table definition.Table.BuildersetDescription(String description)Sets a user-friendly description for the table.TableInfo.BuildersetEncryptionConfiguration(EncryptionConfiguration configuration)Table.BuildersetExpirationTime(Long expirationTime)Sets the time when this table expires, in milliseconds since the epoch.Table.BuildersetFriendlyName(String friendlyName)Sets a user-friendly name for the table.Table.BuildersetLabels(Map<String,String> labels)Sets the labels applied to this table.Table.BuildersetRequirePartitionFilter(Boolean requirePartitionFilter)Table.BuildersetTableConstraints(TableConstraints tableConstraints)Table.BuildersetTableId(TableId tableId)Sets the table identity.
-
-
-
Method Detail
-
setDescription
public Table.Builder setDescription(String description)
Description copied from class:TableInfo.BuilderSets a user-friendly description for the table.- Specified by:
setDescriptionin classTableInfo.Builder
-
setExpirationTime
public Table.Builder setExpirationTime(Long expirationTime)
Description copied from class:TableInfo.BuilderSets the time when this table expires, in milliseconds since the epoch. If not present, the table will persist indefinitely. Expired tables will be deleted and their storage reclaimed.- Specified by:
setExpirationTimein classTableInfo.Builder
-
setFriendlyName
public Table.Builder setFriendlyName(String friendlyName)
Description copied from class:TableInfo.BuilderSets a user-friendly name for the table.- Specified by:
setFriendlyNamein classTableInfo.Builder
-
setTableId
public Table.Builder setTableId(TableId tableId)
Description copied from class:TableInfo.BuilderSets the table identity.- Specified by:
setTableIdin classTableInfo.Builder
-
setDefinition
public Table.Builder setDefinition(TableDefinition definition)
Description copied from class:TableInfo.BuilderSets the table definition. UseStandardTableDefinitionto create simple BigQuery table. UseViewDefinitionto create a BigQuery view. UseExternalTableDefinitionto create a BigQuery a table backed by external data.- Specified by:
setDefinitionin classTableInfo.Builder
-
setEncryptionConfiguration
public TableInfo.Builder setEncryptionConfiguration(EncryptionConfiguration configuration)
- Specified by:
setEncryptionConfigurationin classTableInfo.Builder
-
setLabels
public Table.Builder setLabels(Map<String,String> labels)
Description copied from class:TableInfo.BuilderSets the labels applied to this table.Unstable, because labels are experimental.
When used with
BigQuery.update(TableInfo, TableOption...), settinglabelstonullremoves all labels; otherwise all keys that are mapped tonullvalues are removed and other keys are updated to their respective values.- Specified by:
setLabelsin classTableInfo.Builder
-
setRequirePartitionFilter
public Table.Builder setRequirePartitionFilter(Boolean requirePartitionFilter)
- Overrides:
setRequirePartitionFilterin classTableInfo.Builder
-
setDefaultCollation
public Table.Builder setDefaultCollation(String defaultCollation)
- Specified by:
setDefaultCollationin classTableInfo.Builder
-
setCloneDefinition
public TableInfo.Builder setCloneDefinition(CloneDefinition cloneDefinition)
- Specified by:
setCloneDefinitionin classTableInfo.Builder
-
setTableConstraints
public Table.Builder setTableConstraints(TableConstraints tableConstraints)
- Specified by:
setTableConstraintsin classTableInfo.Builder
-
build
public Table build()
Description copied from class:TableInfo.BuilderCreates aTableInfoobject.- Specified by:
buildin classTableInfo.Builder
-
-