Package org.apache.iceberg.view
Interface ViewBuilder
-
public interface ViewBuilder
A 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 View
create()
Create the view.View
createOrReplace()
Create or replace the view.View
replace()
Replace the view.ViewBuilder
withDefaultCatalog(java.lang.String defaultCatalog)
Set the view default catalog.ViewBuilder
withDefaultNamespace(Namespace defaultNamespace)
Set the view default namespace.ViewBuilder
withDialect(java.lang.String dialect)
Set the view SQL dialect.ViewBuilder
withFieldAliases(java.util.List<java.lang.String> fieldAliases)
Set the view field aliases.ViewBuilder
withFieldComments(java.util.List<java.lang.String> fieldComments)
Set the view field comments.ViewBuilder
withProperties(java.util.Map<java.lang.String,java.lang.String> properties)
Add key/value properties to the view.ViewBuilder
withProperty(java.lang.String key, java.lang.String value)
Add a key/value property to the view.ViewBuilder
withQuery(java.lang.String query)
Set the view query.ViewBuilder
withQueryColumnNames(java.util.List<java.lang.String> queryColumnNames)
Set the view query column names.ViewBuilder
withSchema(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
-
-