Package org.apache.iceberg.view
Interface ViewBuilder
- All Superinterfaces:
VersionBuilder<ViewBuilder>
- All Known Implementing Classes:
BaseMetastoreViewCatalog.BaseViewBuilder
A builder used to create or replace a SQL
View
.
Call ViewCatalog.buildView(org.apache.iceberg.catalog.TableIdentifier)
to create a new builder.
-
Method Summary
Modifier and TypeMethodDescriptioncreate()
Create the view.Create or replace the view.replace()
Replace the view.default ViewBuilder
withLocation
(String location) Sets a location for the viewwithProperties
(Map<String, String> properties) Add key/value properties to the view.withProperty
(String key, String value) Add a key/value property to the view.Methods inherited from interface org.apache.iceberg.view.VersionBuilder
withDefaultCatalog, withDefaultNamespace, withQuery, withSchema
-
Method Details
-
withProperties
Add key/value properties to the view.- Parameters:
properties
- key/value properties- Returns:
- this for method chaining
-
withProperty
Add a key/value property to the view.- Parameters:
key
- a keyvalue
- a value- Returns:
- this for method chaining
-
withLocation
Sets a location for the view- Parameters:
location
- the location to set for the view- Returns:
- this for method chaining
-
create
View create()Create the view.- Returns:
- the view created
-
replace
View replace()Replace the view.- Returns:
- the
View
replaced
-
createOrReplace
View createOrReplace()Create or replace the view.- Returns:
- the
View
created or replaced
-