Package org.apache.iceberg
Class BaseMetastoreCatalog.BaseMetastoreCatalogTableBuilder
- java.lang.Object
-
- org.apache.iceberg.BaseMetastoreCatalog.BaseMetastoreCatalogTableBuilder
-
- All Implemented Interfaces:
Catalog.TableBuilder
- Direct Known Subclasses:
BaseMetastoreViewCatalog.BaseMetastoreViewCatalogTableBuilder
,JdbcCatalog.ViewAwareTableBuilder
- Enclosing class:
- BaseMetastoreCatalog
protected class BaseMetastoreCatalog.BaseMetastoreCatalogTableBuilder extends java.lang.Object implements Catalog.TableBuilder
-
-
Constructor Summary
Constructors Constructor Description BaseMetastoreCatalogTableBuilder(TableIdentifier identifier, Schema schema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Table
create()
Creates the table.Transaction
createOrReplaceTransaction()
Starts a transaction to create or replace the table.Transaction
createTransaction()
Starts a transaction to create the table.Transaction
replaceTransaction()
Starts a transaction to replace the table.Catalog.TableBuilder
withLocation(java.lang.String newLocation)
Sets a location for the table.Catalog.TableBuilder
withPartitionSpec(PartitionSpec newSpec)
Sets a partition spec for the table.Catalog.TableBuilder
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Adds key/value properties to the table.Catalog.TableBuilder
withProperty(java.lang.String key, java.lang.String value)
Adds a key/value property to the table.Catalog.TableBuilder
withSortOrder(SortOrder newSortOrder)
Sets a sort order for the table.
-
-
-
Constructor Detail
-
BaseMetastoreCatalogTableBuilder
public BaseMetastoreCatalogTableBuilder(TableIdentifier identifier, Schema schema)
-
-
Method Detail
-
withPartitionSpec
public Catalog.TableBuilder withPartitionSpec(PartitionSpec newSpec)
Description copied from interface:Catalog.TableBuilder
Sets a partition spec for the table.- Specified by:
withPartitionSpec
in interfaceCatalog.TableBuilder
- Parameters:
newSpec
- a partition spec- Returns:
- this for method chaining
-
withSortOrder
public Catalog.TableBuilder withSortOrder(SortOrder newSortOrder)
Description copied from interface:Catalog.TableBuilder
Sets a sort order for the table.- Specified by:
withSortOrder
in interfaceCatalog.TableBuilder
- Parameters:
newSortOrder
- a sort order- Returns:
- this for method chaining
-
withLocation
public Catalog.TableBuilder withLocation(java.lang.String newLocation)
Description copied from interface:Catalog.TableBuilder
Sets a location for the table.- Specified by:
withLocation
in interfaceCatalog.TableBuilder
- Parameters:
newLocation
- a location- Returns:
- this for method chaining
-
withProperties
public Catalog.TableBuilder withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Description copied from interface:Catalog.TableBuilder
Adds key/value properties to the table.- Specified by:
withProperties
in interfaceCatalog.TableBuilder
- Parameters:
properties
- key/value properties- Returns:
- this for method chaining
-
withProperty
public Catalog.TableBuilder withProperty(java.lang.String key, java.lang.String value)
Description copied from interface:Catalog.TableBuilder
Adds a key/value property to the table.- Specified by:
withProperty
in interfaceCatalog.TableBuilder
- Parameters:
key
- a keyvalue
- a value- Returns:
- this for method chaining
-
create
public Table create()
Description copied from interface:Catalog.TableBuilder
Creates the table.- Specified by:
create
in interfaceCatalog.TableBuilder
- Returns:
- the created table
-
createTransaction
public Transaction createTransaction()
Description copied from interface:Catalog.TableBuilder
Starts a transaction to create the table.- Specified by:
createTransaction
in interfaceCatalog.TableBuilder
- Returns:
- the
Transaction
to create the table
-
replaceTransaction
public Transaction replaceTransaction()
Description copied from interface:Catalog.TableBuilder
Starts a transaction to replace the table.- Specified by:
replaceTransaction
in interfaceCatalog.TableBuilder
- Returns:
- the
Transaction
to replace the table
-
createOrReplaceTransaction
public Transaction createOrReplaceTransaction()
Description copied from interface:Catalog.TableBuilder
Starts a transaction to create or replace the table.- Specified by:
createOrReplaceTransaction
in interfaceCatalog.TableBuilder
- Returns:
- the
Transaction
to create or replace the table
-
-