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 forTable
objects.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Table
build()
Creates aTableInfo
object.TableInfo.Builder
setCloneDefinition(CloneDefinition cloneDefinition)
Table.Builder
setDefaultCollation(String defaultCollation)
Table.Builder
setDefinition(TableDefinition definition)
Sets the table definition.Table.Builder
setDescription(String description)
Sets a user-friendly description for the table.TableInfo.Builder
setEncryptionConfiguration(EncryptionConfiguration configuration)
Table.Builder
setExpirationTime(Long expirationTime)
Sets the time when this table expires, in milliseconds since the epoch.Table.Builder
setFriendlyName(String friendlyName)
Sets a user-friendly name for the table.Table.Builder
setLabels(Map<String,String> labels)
Sets the labels applied to this table.Table.Builder
setRequirePartitionFilter(Boolean requirePartitionFilter)
Table.Builder
setTableConstraints(TableConstraints tableConstraints)
Table.Builder
setTableId(TableId tableId)
Sets the table identity.
-
-
-
Method Detail
-
setDescription
public Table.Builder setDescription(String description)
Description copied from class:TableInfo.Builder
Sets a user-friendly description for the table.- Specified by:
setDescription
in classTableInfo.Builder
-
setExpirationTime
public Table.Builder setExpirationTime(Long expirationTime)
Description copied from class:TableInfo.Builder
Sets 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:
setExpirationTime
in classTableInfo.Builder
-
setFriendlyName
public Table.Builder setFriendlyName(String friendlyName)
Description copied from class:TableInfo.Builder
Sets a user-friendly name for the table.- Specified by:
setFriendlyName
in classTableInfo.Builder
-
setTableId
public Table.Builder setTableId(TableId tableId)
Description copied from class:TableInfo.Builder
Sets the table identity.- Specified by:
setTableId
in classTableInfo.Builder
-
setDefinition
public Table.Builder setDefinition(TableDefinition definition)
Description copied from class:TableInfo.Builder
Sets the table definition. UseStandardTableDefinition
to create simple BigQuery table. UseViewDefinition
to create a BigQuery view. UseExternalTableDefinition
to create a BigQuery a table backed by external data.- Specified by:
setDefinition
in classTableInfo.Builder
-
setEncryptionConfiguration
public TableInfo.Builder setEncryptionConfiguration(EncryptionConfiguration configuration)
- Specified by:
setEncryptionConfiguration
in classTableInfo.Builder
-
setLabels
public Table.Builder setLabels(Map<String,String> labels)
Description copied from class:TableInfo.Builder
Sets the labels applied to this table.Unstable, because labels are experimental.
When used with
BigQuery.update(TableInfo, TableOption...)
, settinglabels
tonull
removes all labels; otherwise all keys that are mapped tonull
values are removed and other keys are updated to their respective values.- Specified by:
setLabels
in classTableInfo.Builder
-
setRequirePartitionFilter
public Table.Builder setRequirePartitionFilter(Boolean requirePartitionFilter)
- Overrides:
setRequirePartitionFilter
in classTableInfo.Builder
-
setDefaultCollation
public Table.Builder setDefaultCollation(String defaultCollation)
- Specified by:
setDefaultCollation
in classTableInfo.Builder
-
setCloneDefinition
public TableInfo.Builder setCloneDefinition(CloneDefinition cloneDefinition)
- Specified by:
setCloneDefinition
in classTableInfo.Builder
-
setTableConstraints
public Table.Builder setTableConstraints(TableConstraints tableConstraints)
- Specified by:
setTableConstraints
in classTableInfo.Builder
-
build
public Table build()
Description copied from class:TableInfo.Builder
Creates aTableInfo
object.- Specified by:
build
in classTableInfo.Builder
-
-