Package org.apache.iceberg.view
Interface ViewBuilder
-
public interface ViewBuilderA builder used to create or replace a SQLView.Call
ViewCatalog.buildView(org.apache.iceberg.catalog.TableIdentifier)to create a new builder.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Viewcreate()Create the view.ViewcreateOrReplace()Create or replace the view.Viewreplace()Replace the view.ViewBuilderwithDefaultCatalog(java.lang.String defaultCatalog)Set the view default catalog.ViewBuilderwithDefaultNamespace(Namespace defaultNamespace)Set the view default namespace.ViewBuilderwithDialect(java.lang.String dialect)Set the view SQL dialect.ViewBuilderwithFieldAliases(java.util.List<java.lang.String> fieldAliases)Set the view field aliases.ViewBuilderwithFieldComments(java.util.List<java.lang.String> fieldComments)Set the view field comments.ViewBuilderwithProperties(java.util.Map<java.lang.String,java.lang.String> properties)Add key/value properties to the view.ViewBuilderwithProperty(java.lang.String key, java.lang.String value)Add a key/value property to the view.ViewBuilderwithQuery(java.lang.String query)Set the view query.ViewBuilderwithQueryColumnNames(java.util.List<java.lang.String> queryColumnNames)Set the view query column names.ViewBuilderwithSchema(Schema schema)Set the view schema.
-
-
-
Method Detail
-
withSchema
ViewBuilder withSchema(Schema schema)
Set the view schema.- Parameters:
schema- view schema- Returns:
- this for method chaining
-
withQuery
ViewBuilder withQuery(java.lang.String query)
Set the view query.- Parameters:
query- view query- Returns:
- this for method chaining
-
withDialect
ViewBuilder withDialect(java.lang.String dialect)
Set the view SQL dialect.- Parameters:
dialect- view SQL dialect- Returns:
- this for method chaining
-
withDefaultCatalog
ViewBuilder withDefaultCatalog(java.lang.String defaultCatalog)
Set the view default catalog.- Parameters:
defaultCatalog- view default catalog- Returns:
- this for method chaining
-
withDefaultNamespace
ViewBuilder withDefaultNamespace(Namespace defaultNamespace)
Set the view default namespace.- Parameters:
defaultNamespace- view default namespace- Returns:
- this for method chaining
-
withQueryColumnNames
ViewBuilder withQueryColumnNames(java.util.List<java.lang.String> queryColumnNames)
Set the view query column names.- Parameters:
queryColumnNames- view query column names- Returns:
- this for method chaining
-
withFieldAliases
ViewBuilder withFieldAliases(java.util.List<java.lang.String> fieldAliases)
Set the view field aliases.- Parameters:
fieldAliases- view field aliases- Returns:
- this for method chaining
-
withFieldComments
ViewBuilder withFieldComments(java.util.List<java.lang.String> fieldComments)
Set the view field comments.- Parameters:
fieldComments- view field comments- Returns:
- this for method chaining
-
withProperties
ViewBuilder withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Add key/value properties to the view.- Parameters:
properties- key/value properties- Returns:
- this for method chaining
-
withProperty
ViewBuilder withProperty(java.lang.String key, java.lang.String value)
Add a key/value property to the view.- Parameters:
key- a keyvalue- a value- Returns:
- this for method chaining
-
create
View create()
Create the view.- Returns:
- the view created
-
-