Package org.apache.iceberg.catalog
Interface Catalog.TableBuilder
- All Known Implementing Classes:
- BaseMetastoreCatalog.BaseMetastoreCatalogTableBuilder,- BaseMetastoreViewCatalog.BaseMetastoreViewCatalogTableBuilder,- JdbcCatalog.ViewAwareTableBuilder
- Enclosing interface:
- Catalog
public static interface Catalog.TableBuilder
A builder used to create valid 
tables or start create/replace transactions.
 Call Catalog.buildTable(TableIdentifier, Schema) to create a new builder.
- 
Method SummaryModifier and TypeMethodDescriptioncreate()Creates the table.Starts a transaction to create or replace the table.Starts a transaction to create the table.Starts a transaction to replace the table.withLocation(String location) Sets a location for the table.Sets a partition spec for the table.withProperties(Map<String, String> properties) Adds key/value properties to the table.withProperty(String key, String value) Adds a key/value property to the table.withSortOrder(SortOrder sortOrder) Sets a sort order for the table.
- 
Method Details- 
withPartitionSpecSets a partition spec for the table.- Parameters:
- spec- a partition spec
- Returns:
- this for method chaining
 
- 
withSortOrderSets a sort order for the table.- Parameters:
- sortOrder- a sort order
- Returns:
- this for method chaining
 
- 
withLocationSets a location for the table.- Parameters:
- location- a location
- Returns:
- this for method chaining
 
- 
withPropertiesAdds key/value properties to the table.- Parameters:
- properties- key/value properties
- Returns:
- this for method chaining
 
- 
withPropertyAdds a key/value property to the table.- Parameters:
- key- a key
- value- a value
- Returns:
- this for method chaining
 
- 
createTable create()Creates the table.- Returns:
- the created table
 
- 
createTransactionTransaction createTransaction()Starts a transaction to create the table.- Returns:
- the Transactionto create the table
 
- 
replaceTransactionTransaction replaceTransaction()Starts a transaction to replace the table.- Returns:
- the Transactionto replace the table
 
- 
createOrReplaceTransactionTransaction createOrReplaceTransaction()Starts a transaction to create or replace the table.- Returns:
- the Transactionto create or replace the table
 
 
-